fix bug #0009138 - corrigindo erro gerado na venda, o tempo de devolução passagem não pode ser null !

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@70278 d1611594-4594-4d17-8e1d-87c2c4800839
master
bruno.neves 2017-06-21 13:36:23 +00:00
parent f2b46bfbfe
commit 54bb34420f
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
declare
dup_val_on_index exception;
pragma exception_init (dup_val_on_index , -00001);
begin
execute immediate 'UPDATE USUARIO SET TEMPODEVOLUCAOPASSAGEM = 0 WHERE TEMPODEVOLUCAOPASSAGEM IS NULL';
exception when dup_val_on_index then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'ALTER TABLE USUARIO MODIFY (TEMPODEVOLUCAOPASSAGEM DEFAULT 0 NOT NULL)';
exception when object_exists then null;
end;