]> git.proxmox.com Git - extjs.git/blame - extjs/examples/classic/simple-tasks/db/schema.sql
add extjs 6.0.1 sources
[extjs.git] / extjs / examples / classic / simple-tasks / db / schema.sql
CommitLineData
6527f429
DM
1CREATE TABLE config (key VARCHAR(50) PRIMARY KEY, value VARCHAR(255));\r
2CREATE TABLE task (id INTEGER PRIMARY KEY AUTOINCREMENT, title VARCHAR(255), list_id INTEGER, due DATE, reminder DATE, done INTEGER, note BLOB);\r
3CREATE TABLE list (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(50), leaf INTEGER, lft INTEGER, rgt INTEGER);\r
4\r
5-- Since sqlite doesn't currently support foreign keys the following trigger is needed to make sqlite do the\r
6-- equivalent of "ON DELETE CASCADE" on the task's "list_id" foreign key.\r
7-- For more info see: http://www.sqlite.org/cvstrac/wiki?p=ForeignKeyTriggers\r
8CREATE TRIGGER fkd_task_list_id\r
9 BEFORE DELETE ON list\r
10 FOR EACH ROW BEGIN\r
11 DELETE from task WHERE list_id = OLD.id;\r
12 END;