mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-08 14:21:29 +01:00
19 lines
713 B
MySQL
19 lines
713 B
MySQL
|
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';
|