Skip to content

Commit

Permalink
add initial migration
Browse files Browse the repository at this point in the history
Signed-off-by: simonsan <[email protected]>
  • Loading branch information
simonsan committed Mar 24, 2024
1 parent 4a13bd2 commit 57cd5bd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions migrations/2024-03-24-201233_create_activities/down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- This file should undo anything in `up.sql`
DROP TABLE activities;
14 changes: 14 additions & 0 deletions migrations/2024-03-24-201233_create_activities/up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-- Migration script for creating the activities table in SQLite

CREATE TABLE activities (
id TEXT PRIMARY KEY,
category TEXT NOT NULL,
description TEXT NOT NULL,
begin TEXT NOT NULL,
end TEXT NOT NULL,
duration INTEGER NOT NULL,
kind TEXT NOT NULL,
status TEXT NOT NULL,
parent_id INTEGER,
FOREIGN KEY (parent_id) REFERENCES activities(id)
);

0 comments on commit 57cd5bd

Please sign in to comment.