scheme update

This commit is contained in:
Denis Fedoseev 2018-08-19 11:07:30 +03:00
parent 156274c109
commit 3d3e83d1d8
4 changed files with 36 additions and 8 deletions

View file

@ -2,13 +2,14 @@
BEGIN;
CREATE TABLE albums (
album_id INTEGER PRIMARY KEY AUTOINCREMENT,
name STRING NOT NULL,
description TEXT,
created DATETIME DEFAULT (CURRENT_TIMESTAMP),
modified DATETIME DEFAULT (CURRENT_TIMESTAMP),
deleted BOOLEAN
);
CREATE TABLE "albums" (
`album_id` INTEGER PRIMARY KEY AUTOINCREMENT,
`name` STRING NOT NULL,
`description` TEXT,
`created` DATETIME DEFAULT (CURRENT_TIMESTAMP),
`modified` DATETIME DEFAULT (CURRENT_TIMESTAMP),
`deleted` BOOLEAN,
`owner_id` INTEGER NOT NULL
)
COMMIT;

13
sql/deploy/exif_data.sql Normal file
View file

@ -0,0 +1,13 @@
-- Deploy fotostore:exif_data to sqlite
BEGIN;
CREATE TABLE `exif_data` (
`record_id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`exif_tag` TEXT NOT NULL,
`tag_data` TEXT NOT NULL,
`image_id` INTEGER,
`deleted` BOOLEAN
);
COMMIT;

7
sql/revert/exif_data.sql Normal file
View file

@ -0,0 +1,7 @@
-- Revert fotostore:exif_data from sqlite
BEGIN;
-- XXX Add DDLs here.
COMMIT;

7
sql/verify/exif_data.sql Normal file
View file

@ -0,0 +1,7 @@
-- Verify fotostore:exif_data on sqlite
BEGIN;
-- XXX Add verifications here.
ROLLBACK;