Skip to content

Commit

Permalink
SQL version
Browse files Browse the repository at this point in the history
  • Loading branch information
S3JER committed Apr 5, 2024
1 parent b4cd6c7 commit ab70852
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 0 additions & 7 deletions backend/migrations/0001_initial_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,3 @@ CREATE TABLE Devices(
account_id INTEGER NOT NULL
REFERENCES Accounts(id) ON DELETE CASCADE
);

CREATE TABLE Events(
id INTEGER PRIMARY KEY NOT NULL,
task_id INTEGER NOT NULL
REFERENCES Tasks(id) ON DELETE CASCADE,
start_time DATETIME NOT NULL
);
6 changes: 6 additions & 0 deletions backend/migrations/0002_create_events_table.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CREATE TABLE Events(
id INTEGER PRIMARY KEY NOT NULL,
task_id INTEGER NOT NULL
REFERENCES Tasks(id) ON DELETE CASCADE,
start_time DATETIME NOT NULL
);

0 comments on commit ab70852

Please sign in to comment.