36716-vm/db/migrations/003_create_bookings_table.sql
2025-12-07 05:00:42 +00:00

11 lines
377 B
SQL

CREATE TABLE IF NOT EXISTS bookings (
id INT AUTO_INCREMENT PRIMARY KEY,
client_id INT NOT NULL,
coach_id INT NOT NULL,
booking_time DATETIME NOT NULL,
status VARCHAR(255) NOT NULL DEFAULT 'pending',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (client_id) REFERENCES clients(id),
FOREIGN KEY (coach_id) REFERENCES coaches(id)
);