36274-vm/db/migrations/006_create_monitoring_data_table.sql
Flatlogic Bot 76b95bec18 v1
2025-11-25 15:04:51 +00:00

8 lines
280 B
SQL

CREATE TABLE IF NOT EXISTS monitoring_data (
id INT AUTO_INCREMENT PRIMARY KEY,
track_id INT NOT NULL,
plays INT NOT NULL,
date DATE NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (track_id) REFERENCES tracks(id) ON DELETE CASCADE
);