0018200: Espec Melhorias no cadastro de Clientes

bug#18200
dev:thiago
qua:debora

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@100840 d1611594-4594-4d17-8e1d-87c2c4800839
master
valdir 2020-03-19 20:39:47 +00:00
parent 78a32ee5f3
commit b733e6d827
2 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,31 @@
declare
object_exists exception;
except_01451 exception;
except_01442 exception;
pragma exception_init (object_exists , -01430);
pragma exception_init (except_01451 , -01451);
pragma exception_init (except_01442 , -01442);
begin
execute immediate 'ALTER TABLE CLIENTE ADD (ISESTRANGEIRO NUMBER(1,0))';
exception
when object_exists then null;
when except_01451 then null;
when except_01442 then null;
end;
/
declare
object_exists exception;
except_01451 exception;
except_01442 exception;
pragma exception_init (object_exists , -01430);
pragma exception_init (except_01451 , -01451);
pragma exception_init (except_01442 , -01442);
begin
execute immediate 'ALTER TABLE CLIENTE_DIRECCION ADD (DESCPAIS VARCHAR2(60 BYTE)) ';
exception
when object_exists then null;
when except_01451 then null;
when except_01442 then null;
end;

View File

@ -0,0 +1,18 @@
DO $$
BEGIN
ALTER TABLE CLIENTE ADD (ISESTRANGEIRO NUMBER(1,0));
EXCEPTION
WHEN OTHERS THEN NULL;
WHEN unique_violation THEN NULL;
END
$$;
/
DO $$
BEGIN
ALTER TABLE CLIENTE_DIRECCION ADD (DESCPAIS VARCHAR2(60 BYTE));
EXCEPTION
WHEN OTHERS THEN NULL;
WHEN unique_violation THEN NULL;
END
$$;
/