2020-06-22 10:57:36 +02:00
|
|
|
CREATE TABLE IF NOT EXISTS MessageFilters (
|
|
|
|
id INTEGER PRIMARY KEY,
|
|
|
|
name TEXT NOT NULL CHECK (name != ''),
|
|
|
|
script TEXT NOT NULL CHECK (script != '')
|
|
|
|
);
|
|
|
|
-- !
|
|
|
|
CREATE TABLE IF NOT EXISTS MessageFiltersInFeeds (
|
|
|
|
filter INTEGER NOT NULL,
|
2020-06-24 14:12:03 +02:00
|
|
|
feed_custom_id TEXT NOT NULL,
|
2020-06-22 10:57:36 +02:00
|
|
|
account_id INTEGER NOT NULL,
|
|
|
|
|
|
|
|
FOREIGN KEY (filter) REFERENCES MessageFilters (id) ON DELETE CASCADE,
|
|
|
|
FOREIGN KEY (account_id) REFERENCES Accounts (id) ON DELETE CASCADE
|
|
|
|
);
|
|
|
|
-- !
|
|
|
|
UPDATE Information SET inf_value = '15' WHERE inf_key = 'schema_version';
|