Forgot to commit db deployment scripts
This commit is contained in:
parent
d8a2c09ea0
commit
a98302199a
3 changed files with 31 additions and 0 deletions
17
sql/deploy/images@v1.0.0.sql
Normal file
17
sql/deploy/images@v1.0.0.sql
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
-- Deploy fotostore:images to sqlite
|
||||||
|
|
||||||
|
BEGIN;
|
||||||
|
|
||||||
|
CREATE TABLE images (
|
||||||
|
file_id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
|
owner_id INTEGER NOT NULL,
|
||||||
|
file_name TEXT NOT NULL,
|
||||||
|
created_time DATETIME NOT NULL
|
||||||
|
DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
FOREIGN KEY (
|
||||||
|
owner_id
|
||||||
|
)
|
||||||
|
REFERENCES users (user_id) ON DELETE CASCADE
|
||||||
|
);
|
||||||
|
|
||||||
|
COMMIT;
|
7
sql/revert/images@v1.0.0.sql
Normal file
7
sql/revert/images@v1.0.0.sql
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
-- Revert fotostore:images from sqlite
|
||||||
|
|
||||||
|
BEGIN;
|
||||||
|
|
||||||
|
DROP TABLE images;
|
||||||
|
|
||||||
|
COMMIT;
|
7
sql/verify/images@v1.0.0.sql
Normal file
7
sql/verify/images@v1.0.0.sql
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
-- Verify fotostore:images on sqlite
|
||||||
|
|
||||||
|
BEGIN;
|
||||||
|
|
||||||
|
select file_id, owner_id, file_name, created_time from images where 0;
|
||||||
|
|
||||||
|
ROLLBACK;
|
Loading…
Reference in a new issue