You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SIPRP/trunk/SIPRPSoft/src/alter3.sql

32 lines
1.2 KiB

UPDATE trabalhadores SET perfil=1 WHERE perfil IS NULL;
UPDATE marcacoes_trabalhador SET motivo =
( SELECT tipo FROM exames WHERE exames.trabalhador_id = marcacoes_trabalhador.trabalhador_id AND
exames.data = marcacoes_trabalhador.data )
WHERE motivo IS NULL AND realizada = 'y';
CREATE TABLE etiquetas
(
id serial NOT NULL,
descricao varchar(255) NOT NULL,
descricao_plain varchar,
altura float4,
largura float4,
margem_esquerda float4,
margem_cima float4,
colunas int4,
linhas int4,
continua char(1) NOT NULL DEFAULT 'n'::bpchar,
altura_folha float4,
largura_folha float4,
margem_vertical_folha float4,
margem_horizontal_folha float4,
CONSTRAINT etiquetas_pkey PRIMARY KEY (id)
)
WITHOUT OIDS;
ALTER TABLE etiquetas OWNER TO postgres;
ALTER TABLE estabelecimentos ADD medico_id int4 REFERENCES medicos( id );
insert into etiquetas ( descricao, descricao_plain, altura, largura, margem_esquerda, margem_cima, colunas, linhas, continua, altura_folha, largura_folha,
margem_horizontal_folha, margem_vertical_folha )
values( 'Etiquetas em folha A4', 'etiquetas em folha a4', 3.7125, 10.5, 0.0, 0.0, 2, 8, 'n', 29.7, 21.0, 0.7, 0.5 );