Merge pull request 'alterada a primary key composta para simples fixes bug#AL-4453' (!159) from AL-4453 into master
Reviewed-on: utilidades/Flyway#159 Reviewed-by: Valdir Cordeiro <valdir.cordeiro@totvs.com.br>master
commit
262433c666
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.76.0</version>
|
||||
<version>1.76.1</version>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
|
|
|
@ -4,15 +4,25 @@ declare
|
|||
pragma exception_init (object_exists , -00955);
|
||||
begin
|
||||
execute immediate 'CREATE TABLE CATEGORIA_FORM_AUTORIZACAO (
|
||||
CATEGORIAFORMAUTORIZACAO_ID NUMBER(7,0),
|
||||
CATEGORIA_ID NUMBER(7,0),
|
||||
EMPRESA_ID NUMBER(7,0),
|
||||
TEXTO CLOB,
|
||||
ACTIVO NUMBER(1,0),
|
||||
USUARIO_ID NUMBER(7,0),
|
||||
FECMODIF DATE,
|
||||
PRIMARY KEY ( CATEGORIA_ID, EMPRESA_ID),
|
||||
CONSTRAINT "fk_categoriafrmautorizacao_categoria" FOREIGN KEY ("CATEGORIA_ID") REFERENCES "CATEGORIA"("CATEGORIA_ID"),
|
||||
CONSTRAINT "fk_categoriafrmautorizacao_empresa" FOREIGN KEY ("EMPRESA_ID") REFERENCES "EMPRESA"("EMPRESA_ID")
|
||||
PRIMARY KEY (CATEGORIAFORMAUTORIZACAO_ID),
|
||||
CONSTRAINT "fk_frmautorizacao_categoria" FOREIGN KEY ("CATEGORIA_ID") REFERENCES "CATEGORIA"("CATEGORIA_ID"),
|
||||
CONSTRAINT "fk_frmautorizacao_empresa" FOREIGN KEY ("EMPRESA_ID") REFERENCES "EMPRESA"("EMPRESA_ID")
|
||||
)';
|
||||
exception when object_exists then null;
|
||||
end;
|
||||
/
|
||||
declare
|
||||
object_exists exception;
|
||||
pragma exception_init (object_exists , -00955);
|
||||
begin
|
||||
execute immediate
|
||||
'CREATE SEQUENCE "CAT_FORM_AUTORIZACAO_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE';
|
||||
exception when object_exists then null;
|
||||
end;
|
Loading…
Reference in New Issue