Add SQLite database storage backend
This commit is contained in:
7
base/database/storage/sqlite/migrations/0_settings.sql
Normal file
7
base/database/storage/sqlite/migrations/0_settings.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- +migrate Up
|
||||
-- SQL in section 'Up' is executed when this migration is applied
|
||||
PRAGMA auto_vacuum = INCREMENTAL; -- https://sqlite.org/pragma.html#pragma_auto_vacuum
|
||||
|
||||
-- +migrate Down
|
||||
-- SQL section 'Down' is executed when this migration is rolled back
|
||||
PRAGMA auto_vacuum = NONE; -- https://sqlite.org/pragma.html#pragma_auto_vacuum
|
||||
19
base/database/storage/sqlite/migrations/1_initial.sql
Normal file
19
base/database/storage/sqlite/migrations/1_initial.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
-- +migrate Up
|
||||
-- SQL in section 'Up' is executed when this migration is applied
|
||||
CREATE TABLE records (
|
||||
key TEXT PRIMARY KEY,
|
||||
|
||||
format SMALLINT NOT NULL,
|
||||
value BLOB NOT NULL,
|
||||
|
||||
created BIGINT NOT NULL,
|
||||
modified BIGINT NOT NULL,
|
||||
expires BIGINT DEFAULT 0 NOT NULL,
|
||||
deleted BIGINT DEFAULT 0 NOT NULL,
|
||||
secret BOOLEAN DEFAULT FALSE NOT NULL,
|
||||
crownjewel BOOLEAN DEFAULT FALSE NOT NULL
|
||||
);
|
||||
|
||||
-- +migrate Down
|
||||
-- SQL section 'Down' is executed when this migration is rolled back
|
||||
DROP TABLE records;
|
||||
Reference in New Issue
Block a user