0020082: Cadastro de Forma Pagamento
bug#20082 dev:valdevir qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@102845 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
2828c784dd
commit
18669c19a9
|
@ -0,0 +1,35 @@
|
||||||
|
declare
|
||||||
|
column_exists exception;
|
||||||
|
pragma exception_init (column_exists , -01430);
|
||||||
|
begin
|
||||||
|
execute immediate 'ALTER TABLE FORMA_PAGO ADD INDVOUCHERRODOVIARIA NUMBER(1,0)';
|
||||||
|
exception when column_exists then null;
|
||||||
|
end;
|
||||||
|
/
|
||||||
|
declare
|
||||||
|
column_exists exception;
|
||||||
|
pragma exception_init (column_exists , -01430);
|
||||||
|
begin
|
||||||
|
execute immediate 'ALTER TABLE SECRETARIA ADD FORMAPAGO_ID NUMBER(7,0)';
|
||||||
|
exception when column_exists then null;
|
||||||
|
end;
|
||||||
|
/
|
||||||
|
declare
|
||||||
|
object_exists exception;
|
||||||
|
except_02275 exception;
|
||||||
|
except_02270 exception;
|
||||||
|
except_02261 exception;
|
||||||
|
|
||||||
|
pragma exception_init (object_exists , -01430);
|
||||||
|
pragma exception_init (except_02275 , -02275);
|
||||||
|
pragma exception_init (except_02270 , -02270);
|
||||||
|
pragma exception_init (except_02261 , -02261);
|
||||||
|
begin
|
||||||
|
execute immediate 'ALTER TABLE SECRETARIA ADD CONSTRAINT FORMAPAGO_ID_FK FOREIGN KEY(FORMAPAGO_ID)REFERENCES FORMA_PAGO(FORMAPAGO_ID)';
|
||||||
|
exception
|
||||||
|
when object_exists then null;
|
||||||
|
when except_02275 then null;
|
||||||
|
when except_02270 then null;
|
||||||
|
when except_02261 then null;
|
||||||
|
end;
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
DO $$
|
||||||
|
BEGIN
|
||||||
|
ALTER TABLE FORMA_PAGO ADD INDVOUCHERRODOVIARIA NUMBER(1,0)
|
||||||
|
EXCEPTION WHEN duplicate_column THEN NULL;
|
||||||
|
END
|
||||||
|
$$;
|
||||||
|
/
|
||||||
|
DO $$
|
||||||
|
BEGIN
|
||||||
|
ALTER TABLE SECRETARIA ADD FORMAPAGO_ID NUMBER(7,0)
|
||||||
|
EXCEPTION WHEN duplicate_column THEN NULL;
|
||||||
|
END
|
||||||
|
$$;
|
||||||
|
/
|
||||||
|
DO $$
|
||||||
|
BEGIN
|
||||||
|
ALTER TABLE SECRETARIA ADD CONSTRAINT FORMAPAGO_ID_FK FOREIGN KEY(FORMAPAGO_ID) REFERENCES FORMA_PAGO(FORMAPAGO_ID);
|
||||||
|
EXCEPTION WHEN duplicate_column THEN NULL;
|
||||||
|
END
|
||||||
|
$$;
|
Loading…
Reference in New Issue