Subversion Repositories Integrator Subversion

Rev

Blame | Last modification | View Log | Download | RSS feed

/*========tur===================================================*/
/* DBMS name:     PostgreSQL 8                                  */
/* Criado em:     28/12/2020                                        */
/* Autor: Bruno Lopes Peixoto                                       */
/*==============================================================*/

SET search_path = sc_sec;

CREATE SEQUENCE sq_orcamento
INCREMENT 1
minvalue 1
maxvalue 99999999
START 1;

ALTER TABLE sq_orcamento owner TO espacoc_sc_sec
;

/*==============================================================*/
/* Table: sec_orcamento                                         */
/*==============================================================*/
CREATE TABLE sec_orcamento (
   seq_orcamento        INT8                 NOT NULL DEFAULT NEXTVAL('sc_sec.sq_orcamento'::regclass),
   seq_categoria        INT8                 NULL,
   tip_categoria        CHAR                 NOT NULL,
   dat_orcado           DATE                 NOT NULL,
   val_orcado           NUMERIC(10,2)        NOT NULL,
   CONSTRAINT pk_orcamento PRIMARY KEY (seq_orcamento)
);

-- set table ownership
ALTER TABLE sec_orcamento owner TO espacoc_sc_sec
;
ALTER TABLE sec_orcamento
   ADD CONSTRAINT fk_orcamento_categoria FOREIGN KEY (seq_categoria)
      REFERENCES sec_categoria (seq_categoria)
      ON DELETE RESTRICT ON UPDATE RESTRICT;

SET search_path = public;