Files
ai_playgroud/database/migrations/002_create_bands_table.sql
T
Claude 143fe3d488 Set up modern PHP MVC project structure for GetYourBand platform
- Implemented clean MVC architecture with Router, Controller, and Model base classes
- Created database migrations for users, bands, bookings, reviews, and availability
- Set up Tailwind CSS with yellow color scheme and modern design
- Added Alpine.js for reactive JavaScript components
- Configured Vite for asset building and hot module replacement
- Created authentication and role-based middleware
- Implemented helper functions and configuration system
- Added comprehensive README with setup instructions
- Configured Apache with proper rewrite rules and security headers
- Set up Composer and npm package management with modern dependencies
2025-12-02 21:31:08 +00:00

39 lines
1.3 KiB
SQL

-- Migration: Create bands table
-- Created: 2025-12-02
CREATE TABLE IF NOT EXISTS bands (
id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT NOT NULL,
name VARCHAR(255) NOT NULL,
slug VARCHAR(255) NOT NULL UNIQUE,
description TEXT,
genre VARCHAR(100),
location VARCHAR(255),
postal_code VARCHAR(10),
price_min DECIMAL(10, 2),
price_max DECIMAL(10, 2),
member_count INT,
phone VARCHAR(50),
website VARCHAR(255),
facebook VARCHAR(255),
instagram VARCHAR(255),
youtube VARCHAR(255),
profile_image VARCHAR(255),
cover_image VARCHAR(255),
is_approved BOOLEAN DEFAULT FALSE,
is_active BOOLEAN DEFAULT TRUE,
view_count INT DEFAULT 0,
average_rating DECIMAL(3, 2) DEFAULT 0.00,
total_reviews INT DEFAULT 0,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
INDEX idx_slug (slug),
INDEX idx_genre (genre),
INDEX idx_location (location),
INDEX idx_postal_code (postal_code),
INDEX idx_is_approved (is_approved),
INDEX idx_average_rating (average_rating),
FULLTEXT idx_search (name, description, genre)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;