2 CREATE SEQUENCE category_cat_id_seq;
4 CREATE TABLE category (
5 cat_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('category_cat_id_seq'),
6 cat_title TEXT NOT NULL,
7 cat_pages INTEGER NOT NULL DEFAULT 0,
8 cat_subcats INTEGER NOT NULL DEFAULT 0,
9 cat_files INTEGER NOT NULL DEFAULT 0,
10 cat_hidden SMALLINT NOT NULL DEFAULT 0
13 CREATE UNIQUE INDEX category_title ON category(cat_title);
14 CREATE INDEX category_pages ON category(cat_pages);