Merge pull request 'GLPI 60358 - Erro ao alterar código ANTT de localidade' (#19) from AL-2145 into master
Reviewed-on: http://18.235.188.113:3000/utilidades/Flyway/pulls/19 Reviewed-by: Célio de Souza Ribeiro JR <celio@rjconsultores.com.br> Reviewed-by: Lucas Taiã <lucas@rjconsultores.com.br>master
commit
924d1f6215
2
pom.xml
2
pom.xml
|
@ -4,7 +4,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>br.com.rjconsultores</groupId>
|
<groupId>br.com.rjconsultores</groupId>
|
||||||
<artifactId>Flyway</artifactId>
|
<artifactId>Flyway</artifactId>
|
||||||
<version>1.0.21</version>
|
<version>1.0.22</version>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
<repository>
|
<repository>
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
declare
|
||||||
|
indice_nao_existe exception;
|
||||||
|
pragma exception_init (indice_nao_existe , -01418);
|
||||||
|
begin
|
||||||
|
execute immediate 'DROP INDEX UNIQUE_CODANTT';
|
||||||
|
exception when indice_nao_existe then null;
|
||||||
|
end;
|
||||||
|
/
|
||||||
|
DECLARE
|
||||||
|
object_exists exception;
|
||||||
|
except_01408 exception;
|
||||||
|
pragma exception_init (object_exists , -00955);
|
||||||
|
pragma exception_init (except_01408 , -01408);
|
||||||
|
BEGIN
|
||||||
|
execute IMMEDIATE 'CREATE UNIQUE INDEX UNIQUE_CODANTT ON PARADA (CASE WHEN ACTIVO = 1 THEN CODANTT ELSE NULL END)';
|
||||||
|
exception
|
||||||
|
when object_exists THEN null;
|
||||||
|
when except_01408 THEN null;
|
||||||
|
END;
|
|
@ -0,0 +1,19 @@
|
||||||
|
declare
|
||||||
|
indice_nao_existe exception;
|
||||||
|
pragma exception_init (indice_nao_existe , -01418);
|
||||||
|
begin
|
||||||
|
execute immediate 'DROP INDEX UNIQUE_CODANTT';
|
||||||
|
exception when indice_nao_existe then null;
|
||||||
|
end;
|
||||||
|
/
|
||||||
|
DECLARE
|
||||||
|
object_exists exception;
|
||||||
|
except_01408 exception;
|
||||||
|
pragma exception_init (object_exists , -00955);
|
||||||
|
pragma exception_init (except_01408 , -01408);
|
||||||
|
BEGIN
|
||||||
|
execute IMMEDIATE 'CREATE UNIQUE INDEX UNIQUE_CODANTT ON PARADA (CASE WHEN ACTIVO = 1 THEN CODANTT ELSE NULL END)';
|
||||||
|
exception
|
||||||
|
when object_exists THEN null;
|
||||||
|
when except_01408 THEN null;
|
||||||
|
END;
|
Loading…
Reference in New Issue