Merge branch 'dev' into gruppDM

This commit is contained in:
Davenludd 2024-03-20 22:04:11 +01:00
commit c995dc52ad
3 changed files with 9 additions and 7 deletions

1
.gitignore vendored
View file

@ -9,6 +9,7 @@ bin
database.txt database.txt
plantuml.jar plantuml.jar
db.sqlite3 db.sqlite3
db.sqlite3-journal
diagram.puml diagram.puml
backend/*.png backend/*.png
backend/*.jpg backend/*.jpg

View file

@ -1,5 +1,5 @@
CREATE TABLE IF NOT EXISTS weekly_reports ( CREATE TABLE IF NOT EXISTS weekly_reports (
report_id INTEGER PRIMARY KEY AUTOINCREMENT, report_id INTEGER AUTO_INCREMENT UNIQUE,
user_id INTEGER NOT NULL, user_id INTEGER NOT NULL,
project_id INTEGER NOT NULL, project_id INTEGER NOT NULL,
week INTEGER NOT NULL, week INTEGER NOT NULL,
@ -12,5 +12,6 @@ CREATE TABLE IF NOT EXISTS weekly_reports (
signed_by INTEGER, signed_by INTEGER,
FOREIGN KEY (user_id) REFERENCES users(id), FOREIGN KEY (user_id) REFERENCES users(id),
FOREIGN KEY (project_id) REFERENCES projects(id), FOREIGN KEY (project_id) REFERENCES projects(id),
FOREIGN KEY (signed_by) REFERENCES users(id) FOREIGN KEY (signed_by) REFERENCES users(id),
PRIMARY KEY (user_id, project_id, week)
); );

View file

@ -34,17 +34,17 @@ VALUES (3,3,"member");
INSERT OR IGNORE INTO user_roles(user_id,project_id,p_role) INSERT OR IGNORE INTO user_roles(user_id,project_id,p_role)
VALUES (2,1,"project_manager"); VALUES (2,1,"project_manager");
INSERT INTO weekly_reports (user_id, project_id, week, development_time, meeting_time, admin_time, own_work_time, study_time, testing_time, signed_by) INSERT OR IGNORE INTO weekly_reports (user_id, project_id, week, development_time, meeting_time, admin_time, own_work_time, study_time, testing_time, signed_by)
VALUES (2, 1, 12, 20, 10, 5, 30, 15, 10, NULL); VALUES (2, 1, 12, 20, 10, 5, 30, 15, 10, NULL);
INSERT INTO weekly_reports (user_id, project_id, week, development_time, meeting_time, admin_time, own_work_time, study_time, testing_time, signed_by) INSERT OR IGNORE INTO weekly_reports (user_id, project_id, week, development_time, meeting_time, admin_time, own_work_time, study_time, testing_time, signed_by)
VALUES (3, 1, 12, 20, 10, 5, 30, 15, 10, NULL); VALUES (3, 1, 12, 20, 10, 5, 30, 15, 10, NULL);
INSERT INTO weekly_reports (user_id, project_id, week, development_time, meeting_time, admin_time, own_work_time, study_time, testing_time, signed_by) INSERT OR IGNORE INTO weekly_reports (user_id, project_id, week, development_time, meeting_time, admin_time, own_work_time, study_time, testing_time, signed_by)
VALUES (3, 1, 14, 20, 10, 5, 30, 15, 10, NULL); VALUES (3, 1, 14, 20, 10, 5, 30, 15, 10, NULL);
INSERT INTO weekly_reports (user_id, project_id, week, development_time, meeting_time, admin_time, own_work_time, study_time, testing_time, signed_by) INSERT OR IGNORE INTO weekly_reports (user_id, project_id, week, development_time, meeting_time, admin_time, own_work_time, study_time, testing_time, signed_by)
VALUES (3, 2, 12, 20, 10, 5, 30, 15, 10, NULL); VALUES (3, 2, 12, 20, 10, 5, 30, 15, 10, NULL);
INSERT INTO weekly_reports (user_id, project_id, week, development_time, meeting_time, admin_time, own_work_time, study_time, testing_time, signed_by) INSERT OR IGNORE INTO weekly_reports (user_id, project_id, week, development_time, meeting_time, admin_time, own_work_time, study_time, testing_time, signed_by)
VALUES (3, 3, 12, 20, 10, 5, 30, 15, 10, NULL); VALUES (3, 3, 12, 20, 10, 5, 30, 15, 10, NULL);