diff options
Diffstat (limited to 'deploy/items@v1.0.0-alpha.1.sql')
-rw-r--r-- | deploy/items@v1.0.0-alpha.1.sql | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/deploy/items@v1.0.0-alpha.1.sql b/deploy/items@v1.0.0-alpha.1.sql deleted file mode 100644 index 0a43f8b..0000000 --- a/deploy/items@v1.0.0-alpha.1.sql +++ /dev/null @@ -1,18 +0,0 @@ --- Deploy kakeibo:items to pg --- requires: schema --- requires: transactions - -BEGIN; - -CREATE TABLE kakeibo.items ( - id SERIAL PRIMARY KEY, - transaction_id INTEGER NOT NULL REFERENCES kakeibo.transactions(id) ON DELETE RESTRICT ON UPDATE RESTRICT, - category TEXT NOT NULL, - subcategory TEXT CHECK (note <> ''), - amount INTEGER NOT NULL CHECK (amount > 0), - note TEXT CHECK (note <> '') , - created_at TIMESTAMP NOT NULL DEFAULT NOW(), - updated_at TIMESTAMP NOT NULL DEFAULT NOW() -); - -COMMIT; |