From 14a0a6f221aee1d55779258b1eb84d82ee4b72f3 Mon Sep 17 00:00:00 2001 From: Frederico Palma Date: Thu, 1 Feb 2007 10:57:38 +0000 Subject: [PATCH] no message git-svn-id: https://svn.coded.pt/svn/SIPRP@276 bb69d46d-e84e-40c8-a05a-06db0d633741 --- trunk/alter_20070124.sql | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/trunk/alter_20070124.sql b/trunk/alter_20070124.sql index 162a74f5..0c2f9c4c 100644 --- a/trunk/alter_20070124.sql +++ b/trunk/alter_20070124.sql @@ -15,8 +15,6 @@ WITHOUT OIDS; ALTER TABLE ecd_oficial OWNER TO postgres; - - -- Table: prestadores -- DROP TABLE prestadores; @@ -42,3 +40,26 @@ CREATE TABLE prestadores ) WITHOUT OIDS; ALTER TABLE prestadores OWNER TO postgres; +alter table marcacoes_grupos_realizados +add marcacoes_trabalhador_estado_id int4 +references marcacoes_trabalhador_estados(id) +-- Table: marcacoes_trabalhador_estados + +-- DROP TABLE marcacoes_trabalhador_estados; + +CREATE TABLE marcacoes_trabalhador_estados +( + id serial NOT NULL, + data date, + estado int4, + marcacao_id int4, + CONSTRAINT marcacoes_trabalhador_estados_pkey PRIMARY KEY (id), + CONSTRAINT marcacoes_trabalhador_estados_marcacao_id_fkey FOREIGN KEY (marcacao_id) + REFERENCES marcacoes_trabalhador (id) MATCH SIMPLE + ON UPDATE NO ACTION ON DELETE NO ACTION +) +WITHOUT OIDS; +ALTER TABLE marcacoes_trabalhador_estados OWNER TO postgres; + +alter table marcacoes_grupos_realizados add marcacoes_trabalhador_estado_id int4 references marcacoes_trabalhador_estados(id); +