diff --git a/src/db/migration/V20190218_1112__mantis13461.sql b/src/db/migration/V20190218_1112__mantis13461.sql new file mode 100644 index 000000000..6a790fa2a --- /dev/null +++ b/src/db/migration/V20190218_1112__mantis13461.sql @@ -0,0 +1,19 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate + + 'CREATE TABLE DIGITA_ITEM_BOLETO + ( + DIGITAITEMBOLETO_ID NUMBER(7) NOT NULL + , DIGITAITEM_ID NUMBER(3) NOT NULL + , DIGITAVENTA_ID NUMBER(7) NOT NULL + , BOLETO_ID NUMBER(15) NOT NULL + , CONSTRAINT DIGITAITEMBOLETO_ID_PK PRIMARY KEY ( DIGITAITEMBOLETO_ID ) ENABLE + , CONSTRAINT DIGITA_ITEM_BOLETO_BOLETO_FK FOREIGN KEY( BOLETO_ID ) REFERENCES BOLETO( BOLETO_ID )ENABLE + , CONSTRAINT DIGITA_ITEM_BOLETO_ITEM_FK FOREIGN KEY( DIGITAITEM_ID , DIGITAVENTA_ID ) REFERENCES DIGITA_ITEM( DIGITAITEM_ID , DIGITAVENTA_ID )ENABLE + )'; +exception when object_exists then null; +end; +