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 413 ahitrov payment smallint default 0,
9 441 ahitrov syncro smallint default 0,
10 449 ahitrov synctime timestamp without time zone,
11 198 ahitrov sections integer[],
12 uid integer,
13 434 ahitrov company_id integer,
14 198 ahitrov manager_id integer,
15 vault_id integer,
16 postman_id integer,
17 session text,
18 name text,
19 data text
20 );
21
22 CREATE INDEX orders_sections ON orders USING gist (sections);
23 CREATE INDEX orders_session ON orders USING btree (session) where session is not null;
24 CREATE INDEX orders_uid ON orders USING btree (uid) where uid is not null;