From 49ca0431573f76cfc7b3b7731969266801779c8b Mon Sep 17 00:00:00 2001 From: al8763be Date: Wed, 20 Mar 2024 21:51:02 +0100 Subject: [PATCH 1/3] =?UTF-8?q?ingen=20d=C3=A5lig=20st=C3=A4mmning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/internal/database/migrations/0035_weekly_report.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/internal/database/migrations/0035_weekly_report.sql b/backend/internal/database/migrations/0035_weekly_report.sql index 8f76b80..be2a2d3 100644 --- a/backend/internal/database/migrations/0035_weekly_report.sql +++ b/backend/internal/database/migrations/0035_weekly_report.sql @@ -1,5 +1,5 @@ CREATE TABLE IF NOT EXISTS weekly_reports ( - report_id INTEGER PRIMARY KEY AUTOINCREMENT, + report_id INTEGER AUTO_INCREMENT UNIQUE, user_id INTEGER NOT NULL, project_id INTEGER NOT NULL, week INTEGER NOT NULL, @@ -12,5 +12,6 @@ CREATE TABLE IF NOT EXISTS weekly_reports ( signed_by INTEGER, FOREIGN KEY (user_id) REFERENCES users(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) ); \ No newline at end of file From 4288b064f3886351c5178ccd6c14bedef9ae8da5 Mon Sep 17 00:00:00 2001 From: al8763be Date: Wed, 20 Mar 2024 21:53:08 +0100 Subject: [PATCH 2/3] =?UTF-8?q?fixade=20d=C3=A5lig=20st=C3=A4mmning=20igen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/db.sqlite3-journal | Bin 0 -> 4616 bytes .../database/sample_data/0010_sample_data.sql | 10 +++++----- 2 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 backend/db.sqlite3-journal diff --git a/backend/db.sqlite3-journal b/backend/db.sqlite3-journal new file mode 100644 index 0000000000000000000000000000000000000000..fd14fa4b519545ad5a261fe3da992d38a41ff1a3 GIT binary patch literal 4616 zcmeI$Ee?P%41m#Y1wjG~hr)6(GJ}C^aAi0Fo)N^(0QoBVld3*hksM`vjA`mb>|64R z?!N*>lWw!_6nCXWAb Date: Wed, 20 Mar 2024 21:56:03 +0100 Subject: [PATCH 3/3] Deleted sqlite3-journal --- .gitignore | 1 + backend/db.sqlite3-journal | Bin 4616 -> 0 bytes 2 files changed, 1 insertion(+) delete mode 100644 backend/db.sqlite3-journal diff --git a/.gitignore b/.gitignore index 313b735..05f913b 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ bin database.txt plantuml.jar db.sqlite3 +db.sqlite3-journal diagram.puml backend/*.png backend/*.jpg diff --git a/backend/db.sqlite3-journal b/backend/db.sqlite3-journal deleted file mode 100644 index fd14fa4b519545ad5a261fe3da992d38a41ff1a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4616 zcmeI$Ee?P%41m#Y1wjG~hr)6(GJ}C^aAi0Fo)N^(0QoBVld3*hksM`vjA`mb>|64R z?!N*>lWw!_6nCXWAb