Line # Revision Author
1 198 ahitrov CREATE TABLE orders (
2 id integer DEFAULT nextval(('public.documents_id_seq'::text)::regclass) NOT NULL,
3 ctime timestamp without time zone DEFAULT now() NOT NULL,
4 mtime timestamp without time zone DEFAULT now() NOT NULL,
5 dtime timestamp without time zone DEFAULT now() NOT NULL,
6 class text DEFAULT 'webshop::Order'::text NOT NULL,
7 status smallint default 0 NOT NULL,
8 sections integer[],
9 uid integer,
10 manager_id integer,
11 vault_id integer,
12 postman_id integer,
13 session text,
14 name text,
15 data text
16 );
17
18 CREATE INDEX orders_sections ON orders USING gist (sections);
19 CREATE INDEX orders_session ON orders USING btree (session) where session is not null;
20 CREATE INDEX orders_uid ON orders USING btree (uid) where uid is not null;