mirror of
https://github.com/martinrotter/rssguard.git
synced 2024-12-29 09:31:24 +01:00
21 lines
708 B
SQL
21 lines
708 B
SQL
USE ##;
|
|
-- !
|
|
CREATE TABLE IF NOT EXISTS Labels (
|
|
id INTEGER PRIMARY KEY,
|
|
name TEXT NOT NULL CHECK (name != ''),
|
|
color VARCHAR(7),
|
|
custom_id TEXT,
|
|
account_id INTEGER NOT NULL,
|
|
|
|
FOREIGN KEY (account_id) REFERENCES Accounts (id)
|
|
);
|
|
-- !
|
|
CREATE TABLE IF NOT EXISTS LabelsInMessages (
|
|
label TEXT NOT NULL, /* Custom ID of label. */
|
|
message TEXT NOT NULL, /* Custom ID of message. */
|
|
account_id INTEGER NOT NULL,
|
|
|
|
FOREIGN KEY (account_id) REFERENCES Accounts (id) ON DELETE CASCADE
|
|
);
|
|
-- !
|
|
UPDATE Information SET inf_value = '16' WHERE inf_key = 'schema_version'; |