Browse Source

Add DB structure exemple

develop
acab.io 1 year ago
parent
commit
571f33c430
1 changed files with 17 additions and 0 deletions
  1. +17
    -0
      db/dump.sql

+ 17
- 0
db/dump.sql View File

@ -0,0 +1,17 @@
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;

Loading…
Cancel
Save