TTime/backend/internal/database/migrations/0035_weekly_report.sql
2024-03-20 21:51:02 +01:00

17 lines
No EOL
527 B
SQL

CREATE TABLE IF NOT EXISTS weekly_reports (
report_id INTEGER AUTO_INCREMENT UNIQUE,
user_id INTEGER NOT NULL,
project_id INTEGER NOT NULL,
week INTEGER NOT NULL,
development_time INTEGER,
meeting_time INTEGER,
admin_time INTEGER,
own_work_time INTEGER,
study_time INTEGER,
testing_time INTEGER,
signed_by INTEGER,
FOREIGN KEY (user_id) REFERENCES users(id),
FOREIGN KEY (project_id) REFERENCES projects(id),
FOREIGN KEY (signed_by) REFERENCES users(id),
PRIMARY KEY (user_id, project_id, week)
);