diff --git a/src/db/migration/V20170621_0832__mantis9138.sql b/src/db/migration/V20170621_0832__mantis9138.sql new file mode 100644 index 000000000..f04fa077d --- /dev/null +++ b/src/db/migration/V20170621_0832__mantis9138.sql @@ -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; \ No newline at end of file