From 49e390327a6d97b79e071f5496c24a59934fdf63 Mon Sep 17 00:00:00 2001 From: "jhonatas.alves" Date: Wed, 23 Jun 2021 12:46:55 +0000 Subject: [PATCH] fixes bug#api23 dev:jhonatas qua:marcelo http://jira.rjconsultores.com.br:8080/browse/API-23 git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@107453 d1611594-4594-4d17-8e1d-87c2c4800839 --- src/db/migration/V20210623__0929_api23.sql | 24 +++++++++++++++++++ src/db/migration/V20210623__0930_api23.sql | 27 ++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 src/db/migration/V20210623__0929_api23.sql create mode 100644 src/db/migration/V20210623__0930_api23.sql diff --git a/src/db/migration/V20210623__0929_api23.sql b/src/db/migration/V20210623__0929_api23.sql new file mode 100644 index 000000000..b78a58c8f --- /dev/null +++ b/src/db/migration/V20210623__0929_api23.sql @@ -0,0 +1,24 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate + 'CREATE TABLE TIPO_TERMO ( + TIPOTERMO_ID INTEGER NOT NULL PRIMARY KEY, + DESCTIPOTERMO VARCHAR2(200), + FECMODIF DATE NOT NULL, + ACTIVO INTEGER NOT NULL, + USUARIO_ID INTEGER NOT NULL + )'; + exception when object_exists then null; +end; +/ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate + 'CREATE SEQUENCE TIPO_TERMO_SEQ MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE'; + exception when object_exists then null; +end; +/ \ No newline at end of file diff --git a/src/db/migration/V20210623__0930_api23.sql b/src/db/migration/V20210623__0930_api23.sql new file mode 100644 index 000000000..76c6e0793 --- /dev/null +++ b/src/db/migration/V20210623__0930_api23.sql @@ -0,0 +1,27 @@ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate + 'CREATE TABLE TERMOS_ECOMERCE ( + TERMOSECOMERCE_ID INTEGER NOT NULL PRIMARY KEY, + EMPRESA_ID INTEGER NOT NULL, + TEXTOTERMO VARCHAR2(4000), + TIPOTERMO_ID INTEGER NOT NULL, + ACTIVO INTEGER NOT NULL, + FECMODIF DATE NOT NULL, + USUARIO_ID INTEGER NOT NULL, + CONSTRAINT FK_TIPO_TERMO FOREIGN KEY (TIPOTERMO_ID) REFERENCES TIPO_TERMO(TIPOTERMO_ID) + )'; + exception when object_exists then null; +end; +/ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); +begin + execute immediate + 'CREATE SEQUENCE TERMOS_ECOMERCE_SEQ MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE'; + exception when object_exists then null; +end; +/ \ No newline at end of file