Merge pull request 'fixes bug#AL_4075' (!120) from AL_4075 into master
Reviewed-on: utilidades/Flyway#120 Reviewed-by: pinheiro <valdevir@rjconsultores.com.br>master
commit
a1bc176b9d
2
pom.xml
2
pom.xml
|
@ -4,7 +4,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>br.com.rjconsultores</groupId>
|
||||
<artifactId>Flyway</artifactId>
|
||||
<version>1.45.3</version>
|
||||
<version>1.46.0</version>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
|
|
|
@ -0,0 +1,64 @@
|
|||
declare
|
||||
dup_val_on_index exception;
|
||||
except_02291 exception;
|
||||
|
||||
pragma exception_init (dup_val_on_index , -00001);
|
||||
pragma exception_init (except_02291 , -02291);
|
||||
begin
|
||||
execute immediate 'UPDATE usuario_ubicacion SET activo=0, usuariomodif_id=1, fecmodif=sysdate WHERE ROWID IN ( SELECT rid FROM ( SELECT ROWID rid, ROW_NUMBER() OVER(PARTITION BY usuario_id, activo ORDER BY ROWID ) rn FROM usuario_ubicacion where activo=1 ) WHERE rn <> 1 )';
|
||||
exception
|
||||
when dup_val_on_index then null;
|
||||
when except_02291 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 usuario_ubicacion ADD PADRAO NUMBER(1,0)';
|
||||
exception
|
||||
when object_exists then null;
|
||||
when except_01451 then null;
|
||||
when except_01442 then null;
|
||||
end;
|
||||
/
|
||||
|
||||
|
||||
declare
|
||||
dup_val_on_index exception;
|
||||
except_02291 exception;
|
||||
|
||||
pragma exception_init (dup_val_on_index , -00001);
|
||||
pragma exception_init (except_02291 , -02291);
|
||||
begin
|
||||
execute immediate 'UPDATE usuario_ubicacion set padrao=1 WHERE activo=1';
|
||||
exception
|
||||
when dup_val_on_index then null;
|
||||
when except_02291 then null;
|
||||
end;
|
||||
/
|
||||
|
||||
declare
|
||||
dup_val_on_index exception;
|
||||
except_02291 exception;
|
||||
|
||||
pragma exception_init (dup_val_on_index , -00001);
|
||||
pragma exception_init (except_02291 , -02291);
|
||||
begin
|
||||
execute immediate 'insert into constante (constante_id,nombconstante,descconstante,valorconstante,indmantenimientousuario,activo,fecmodif,usuario_id)
|
||||
values (constante_seq.nextval,''IND_MULTI_PUNTOVENTA_CRIADO'',''INDICA SE O CODIGO O CODIGO, JÁ POSSUI O MULTI PTV'',''true'',0,1,sysdate,1)';
|
||||
exception
|
||||
when dup_val_on_index then null;
|
||||
when except_02291 then null;
|
||||
end;
|
||||
/
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue