From 614130b75deb5b28cdd1740b3cba4ce2b4602a0d Mon Sep 17 00:00:00 2001 From: leonardo Date: Mon, 10 Jul 2017 21:36:09 +0000 Subject: [PATCH] fixes bug #9356 git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@71201 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20170710_1803__mantis9356.sql | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/db/migration/V20170710_1803__mantis9356.sql diff --git a/src/db/migration/V20170710_1803__mantis9356.sql b/src/db/migration/V20170710_1803__mantis9356.sql new file mode 100644 index 000000000..4e584a492 --- /dev/null +++ b/src/db/migration/V20170710_1803__mantis9356.sql @@ -0,0 +1,17 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00001); +begin + execute immediate 'update USUARIO set TEMPODEVOLUCAOPASSAGEM = -1 where TEMPODEVOLUCAOPASSAGEM = 0 OR TEMPODEVOLUCAOPASSAGEM is null'; + exception when object_exists then null; +end; + +/ + +declare + object_exists exception; + pragma exception_init (object_exists , -01451); +begin + execute immediate 'ALTER TABLE USUARIO MODIFY (TEMPODEVOLUCAOPASSAGEM DEFAULT -1 )'; + exception when object_exists then null; +end; \ No newline at end of file