Subversion Repositories Integrator Subversion

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 espaco 1
/*========tur===================================================*/
2
/* DBMS name:     PostgreSQL 8                                  */
3
/* Criado em:     28/12/2020                                        */
4
/* Autor: Bruno Lopes Peixoto                                       */
5
/*==============================================================*/
6
 
7
SET search_path = sc_sec;
8
 
9
CREATE SEQUENCE sq_orcamento
10
INCREMENT 1
11
minvalue 1
12
maxvalue 99999999
13
START 1;
14
 
15
ALTER TABLE sq_orcamento owner TO espacoc_sc_sec
16
;
17
 
18
/*==============================================================*/
19
/* Table: sec_orcamento                                         */
20
/*==============================================================*/
21
CREATE TABLE sec_orcamento (
22
   seq_orcamento        INT8                 NOT NULL DEFAULT NEXTVAL('sc_sec.sq_orcamento'::regclass),
23
   seq_categoria        INT8                 NULL,
24
   tip_categoria        CHAR                 NOT NULL,
25
   dat_orcado           DATE                 NOT NULL,
26
   val_orcado           NUMERIC(10,2)        NOT NULL,
27
   CONSTRAINT pk_orcamento PRIMARY KEY (seq_orcamento)
28
);
29
 
30
-- set table ownership
31
ALTER TABLE sec_orcamento owner TO espacoc_sc_sec
32
;
33
ALTER TABLE sec_orcamento
34
   ADD CONSTRAINT fk_orcamento_categoria FOREIGN KEY (seq_categoria)
35
      REFERENCES sec_categoria (seq_categoria)
36
      ON DELETE RESTRICT ON UPDATE RESTRICT;
37
 
38
SET search_path = public;