Simple Status Page
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

17 lines
416 B

BEGIN TRANSACTION;
PRAGMA foreign_keys=ON;
CREATE TABLE REPORTS (
ID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
DATE TEXT,
TITLE VARCHAR( 500 ),
MAINDESCRIPTION TEXT,
STATE INTEGER DEFAULT 0
);
CREATE TABLE REPORT_DETAILS (
ID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
REPORT_ID INTEGER,
DATE TEXT,
DESCRIPTION TEXT,
FOREIGN KEY (REPORT_ID) REFERENCES REPORTS(ID) ON DELETE CASCADE
);
COMMIT;