u
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { SCHEMA_VERSION } from './migrate.js';
|
||||
|
||||
const UTC_NOW = "strftime('%Y-%m-%dT%H:%M:%fZ', 'now')";
|
||||
|
||||
export const INIT_META = `
|
||||
@@ -5,7 +7,7 @@ CREATE TABLE IF NOT EXISTS meta (
|
||||
"key" TEXT PRIMARY KEY,
|
||||
value TEXT NOT NULL
|
||||
);
|
||||
INSERT OR IGNORE INTO meta ("key", value) VALUES ('version', '1');
|
||||
INSERT OR IGNORE INTO meta ("key", value) VALUES ('version', '${SCHEMA_VERSION}');
|
||||
`;
|
||||
|
||||
export const INIT_LANGUAGE = `
|
||||
@@ -629,6 +631,9 @@ CREATE TABLE IF NOT EXISTS posterminal (
|
||||
sync_root_articles INTEGER NOT NULL DEFAULT 1,
|
||||
lastseen_at TEXT,
|
||||
updated_at TEXT NOT NULL DEFAULT (${UTC_NOW}),
|
||||
sort INTEGER NOT NULL DEFAULT 0,
|
||||
enabled INTEGER NOT NULL DEFAULT 1,
|
||||
clientversion TEXT,
|
||||
FOREIGN KEY (company_id) REFERENCES company(id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (root_category_id) REFERENCES category(id) ON DELETE SET NULL
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user