Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
blog.sql
r161 r170 1 DROP TABLE comments; DROP TABLE entries; DROP TABLE categories; DROP TABLE users; 2 3 CREATE TABLE categories ( 4 id serial NOT NULL PRIMARY KEY, 5 name text NOT NULL, 6 description text, 7 user_id integer REFERENCES users ON DELETE CASCADE 8 ); 1 --DROP TABLE comments; DROP TABLE entries; DROP TABLE categories; DROP TABLE users; 9 2 10 3 CREATE TABLE users ( … … 19 12 enabled bool NOT NULL DEFAULT true, 20 13 moderate bool NOT NULL DEFAULT true, 21 editor bool NOT NULL DEFAULT true; 14 editor bool NOT NULL DEFAULT true 15 ); 16 17 CREATE TABLE categories ( 18 id serial NOT NULL PRIMARY KEY, 19 name text NOT NULL, 20 description text, 21 user_id integer REFERENCES users ON DELETE CASCADE 22 22 ); 23 23 … … 41 41 body text NOT NULL, 42 42 host text NOT NULL, 43 moderated bool NOT NULL DEFAULT false ;44 spam bool NOT NULL DEFAULT false ;43 moderated bool NOT NULL DEFAULT false, 44 spam bool NOT NULL DEFAULT false 45 45 ); 46 46
