Compare commits

...

2 commits

Author SHA1 Message Date
Denis Fedoseev
140a179a8b Merge branch 'master' of github.com:alpha6/fotostore 2018-09-09 16:43:19 +03:00
Denis Fedoseev
a98302199a Forgot to commit db deployment scripts 2017-08-04 22:52:53 +03:00
3 changed files with 31 additions and 0 deletions

View 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;

View file

@ -0,0 +1,7 @@
-- Revert fotostore:images from sqlite
BEGIN;
DROP TABLE images;
COMMIT;

View 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;