File: db_update_mysql_15_16.sql

package info (click to toggle)
rssguard 3.9.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 50,240 kB
  • sloc: cpp: 39,218; sql: 853; sh: 285; xml: 127; python: 59; makefile: 8
file content (21 lines) | stat: -rw-r--r-- 708 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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';