equal
deleted
inserted
replaced
1 --- vim: set noet nosta sw=4 ts=4 ft=sql: |
1 --- vim: set noet nosta sw=4 ts=4 ft=sql: |
2 |
|
3 BEGIN; |
2 BEGIN; |
4 |
3 |
5 DROP TABLE IF EXISTS rules; |
4 DROP TABLE IF EXISTS requests; |
6 CREATE TABLE rules ( |
5 CREATE TABLE requests ( |
|
6 hi INT, |
|
7 rewrite_rule INTEGER REFERENCES rewrite_rules( id ) ON DELETE SET NULL ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED |
|
8 ); |
|
9 |
|
10 DROP TABLE IF EXISTS rewrite_rules; |
|
11 CREATE TABLE rewrite_rules ( |
|
12 id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, |
7 redir TINYINT NOT NULL DEFAULT 0 CHECK( redir IN (0,1,2) ) |
13 redir TINYINT NOT NULL DEFAULT 0 CHECK( redir IN (0,1,2) ) |
8 ); |
14 ); |
9 |
15 |
10 COMMIT; |
16 COMMIT; |