pgsql/investigations/ar-cash.sql
[Pman.Xtuple] / pgsql / x-dragon-dragon-report.sql
1 --
2 -- first go at dragon reports
3
4
5 CREATE SEQUENCE dragon_report_id_seq
6   INCREMENT 1
7   MINVALUE 1
8   MAXVALUE 2147483647
9   START 1
10   CACHE 1;
11 ALTER TABLE recvgrp_id_seq
12   OWNER TO admin;
13 GRANT ALL ON TABLE dragon_report_id_seq TO admin;
14 GRANT ALL ON TABLE dragon_report_id_seq TO xtrole;
15
16 CREATE TABLE dragon_report
17 (
18
19     id integer NOT NULL DEFAULT nextval(('dragon_report_id_seq'::text)::regclass),
20     name text NOT NULL,
21     query text,
22   
23
24   CONSTRAINT dragon_report_pkey PRIMARY KEY (id)
25 )
26 WITH (
27   OIDS=FALSE
28 );
29
30
31 ALTER TABLE dragon_report
32   OWNER TO admin;
33 GRANT ALL ON TABLE dragon_report TO admin;
34 GRANT ALL ON TABLE dragon_report TO xtrole;
35 COMMENT ON TABLE dragon_report
36   IS 'first go at dragon reports';
37   
38