Cadastro de desconto por contrato feat bug#AL-4342

master
Fabio 2024-07-16 19:59:16 -03:00
parent 3937e5c482
commit 4240e2f882
2 changed files with 30 additions and 1 deletions

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.rjconsultores</groupId>
<artifactId>Flyway</artifactId>
<version>1.66.0</version>
<version>1.67.0</version>
<distributionManagement>
<repository>

View File

@ -0,0 +1,29 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'CREATE TABLE DESCONTO_CONTRATO (
DESCONTOCONTRATO_ID NUMBER(7,0) PRIMARY KEY,
CONTRATO_ID NUMBER(7,0),
DATA_INICIAL DATE,
DATA_FINAL DATE,
PORCENTAGEM NUMBER(5,2),
INDDESCONTO NUMBER(1,0),
USUARIO_ID NUMBER(7,0),
ACTIVO NUMBER(1,0),
FECMODIF DATE,
CONSTRAINT fk_contrato_desconto FOREIGN KEY (CONTRATO_ID) REFERENCES CONTRATO_CORPORATIVO(CONTRATO_ID),
CONSTRAINT fk_usuario_contrato_desconto FOREIGN KEY (USUARIO_ID) REFERENCES USUARIO(USUARIO_ID)
)';
exception when object_exists then null;
end;
/
declare
object_exists exception;
pragma exception_init (object_exists , -00955);
begin
execute immediate 'CREATE SEQUENCE "DESCONTO_CONTRATO_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE';
exception when object_exists then null;
end;
/