diff options
author | Joris | 2017-09-24 22:14:48 +0200 |
---|---|---|
committer | Joris | 2017-11-07 09:33:01 +0100 |
commit | 898e7ed11ab0958fcdaf65b99b33f7b04787630a (patch) | |
tree | 8b5ab951c36d7d27550a7c4eaad16bbd2cd0edb1 /src/migrations | |
parent | 14bdbc8c937f5d0b35c61350dba28cb41c3737cd (diff) |
Bootstrap with GHCJS and reflex:
- setup login and logout,
- first draft of payment view.
Diffstat (limited to 'src/migrations')
-rw-r--r-- | src/migrations/2.sql | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/migrations/2.sql b/src/migrations/2.sql new file mode 100644 index 0000000..ec0d1b0 --- /dev/null +++ b/src/migrations/2.sql @@ -0,0 +1,23 @@ +BEGIN TRANSACTION; + +ALTER TABLE payment RENAME TO tmp_payment; + +CREATE TABLE IF NOT EXISTS "payment"( + "id" INTEGER PRIMARY KEY, + "user" INTEGER NOT NULL REFERENCES "user", + "name" VARCHAR NOT NULL, + "cost" INTEGER NOT NULL, + "date" DATE NOT NULL, + "frequency" VARCHAR NOT NULL, + "created_at" TIMESTAMP NOT NULL, + "edited_at" TIMESTAMP NULL, + "deleted_at" TIMESTAMP NULL +); + +INSERT INTO payment(id, user, name, cost, date, frequency, created_at, edited_at, deleted_at) +SELECT id, user_id, name, cost, date, frequency, created_at, edited_at, deleted_at +FROM tmp_payment; + +DROP TABLE tmp_payment; + +COMMIT; |