diff --git a/src/db/migration/V20170704_1505__mantis9320.sql b/src/db/migration/V20170704_1505__mantis9320.sql index 1a35dc12c..5bb5a43b5 100644 --- a/src/db/migration/V20170704_1505__mantis9320.sql +++ b/src/db/migration/V20170704_1505__mantis9320.sql @@ -1,3 +1,19 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00001); +begin + execute immediate 'update CATEGORIA_DESCUENTO set indSegunda = 1 where indSegunda is null'; + execute immediate 'update CATEGORIA_DESCUENTO set indTerca = 1 where indTerca is null'; + execute immediate 'update CATEGORIA_DESCUENTO set indQuarta = 1 where indQuarta is null'; + execute immediate 'update CATEGORIA_DESCUENTO set indQuinta = 1 where indQuinta is null'; + execute immediate 'update CATEGORIA_DESCUENTO set indSexta = 1 where indSexta is null'; + execute immediate 'update CATEGORIA_DESCUENTO set indSabado = 1 where indSabado is null'; + execute immediate 'update CATEGORIA_DESCUENTO set indDomingo = 1 where indDomingo is null'; + exception when object_exists then null; +end; + +/ + declare object_exists exception; pragma exception_init (object_exists , -01451); @@ -11,20 +27,3 @@ begin execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO MODIFY (INDDOMINGO NOT NULL)'; exception when object_exists then null; end; - -/ - -declare - object_exists exception; - pragma exception_init (object_exists , -01451); -begin - execute immediate 'update CATEGORIA_DESCUENTO set indSegunda = 1 where indSegunda is null'; - execute immediate 'update CATEGORIA_DESCUENTO set indTerca = 1 where indTerca is null'; - execute immediate 'update CATEGORIA_DESCUENTO set indQuarta = 1 where indQuarta is null'; - execute immediate 'update CATEGORIA_DESCUENTO set indQuinta = 1 where indQuinta is null'; - execute immediate 'update CATEGORIA_DESCUENTO set indSexta = 1 where indSexta is null'; - execute immediate 'update CATEGORIA_DESCUENTO set indSabado = 1 where indSabado is null'; - execute immediate 'update CATEGORIA_DESCUENTO set indDomingo = 1 where indDomingo is null'; - exception when object_exists then null; -end; -