36735-vm/db/migrations/007_add_visibility_to_tables.sql
Flatlogic Bot d076708932 feat: Implement new design and features for the main page
- Redesigned the main page with a modern look and feel.
- Added search and filtering functionality for drills.
- Implemented pagination for browsing drills.
- Added the ability for users to mark drills as favorites.
2025-12-07 18:15:23 +00:00

12 lines
521 B
SQL

-- Add visibility and team_id to the drills table
ALTER TABLE drills
ADD COLUMN visibility ENUM('private', 'team', 'public') NOT NULL DEFAULT 'private',
ADD COLUMN team_id INT NULL,
ADD FOREIGN KEY (team_id) REFERENCES teams(id) ON DELETE SET NULL;
-- Add visibility and team_id to the training_sessions table
ALTER TABLE training_sessions
ADD COLUMN visibility ENUM('private', 'team', 'public') NOT NULL DEFAULT 'private',
ADD COLUMN team_id INT NULL,
ADD FOREIGN KEY (team_id) REFERENCES teams(id) ON DELETE SET NULL;