From a3eef904e4db39be2fcb63f3fb6e85f5a25b7a92 Mon Sep 17 00:00:00 2001 From: "lucas.taia" Date: Tue, 22 Dec 2020 13:04:37 +0000 Subject: [PATCH] bug#166 dev:lucas qua: merge scripts antigos branch pricing gestao git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@104814 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../migration/V20190108_1737__mantis14988.sql | 19 ++++++++++++++----- .../migration/V20191014_1500__mantis14991.sql | 6 +++--- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/db/migration/V20190108_1737__mantis14988.sql b/src/db/migration/V20190108_1737__mantis14988.sql index 4c343ae1d..b95167a05 100644 --- a/src/db/migration/V20190108_1737__mantis14988.sql +++ b/src/db/migration/V20190108_1737__mantis14988.sql @@ -46,16 +46,16 @@ declare object_exists exception; pragma exception_init (object_exists , -00955); begin - execute immediate 'CREATE TABLE GP_PRICING_ESPECIFICO_CATEGORIA( + execute immediate 'CREATE TABLE GP_PRICING_ESP_CATEGORIA( PRICINGESPECIFICO_CATEGORIAID NUMBER(7,0), PRICINGESPECIFICO_ID NUMBER (7,0), CATEGORIA_ID NUMBER (7,0), FECMODIF DATE, USUARIO_ID NUMBER (7,0), ACTIVO NUMBER (1,0), - CONSTRAINT GP_PRICING_ESPEC_CATEGORIA_PK PRIMARY KEY (PRICINGESPECIFICO_CATEGORIAID), - CONSTRAINT GP_PRICING_CAT_001_FK FOREIGN KEY(PRICINGESPECIFICO_ID) REFERENCES GP_PRICING_ESPECIFICO (PRICINGESPECIFICO_ID), - CONSTRAINT GP_PRICING_CAT_002_FK FOREIGN KEY(CATEGORIA_ID) REFERENCES CATEGORIA (CATEGORIA_ID) + CONSTRAINT GP_PRICING_ESP_CATEGORIA_PK PRIMARY KEY (PRICINGESPECIFICO_CATEGORIAID), + CONSTRAINT GP_PRICING_CAT_ESP_001_FK FOREIGN KEY(PRICINGESPECIFICO_ID) REFERENCES GP_PRICING_ESPECIFICO (PRICINGESPECIFICO_ID), + CONSTRAINT GP_PRICING_CAT_ESP_002_FK FOREIGN KEY(CATEGORIA_ID) REFERENCES CATEGORIA (CATEGORIA_ID) )'; exception when object_exists then null; end; @@ -143,4 +143,13 @@ declare begin execute immediate 'CREATE SEQUENCE GP_PRICING_ESP_CANAL_SEQ START WITH 1 INCREMENT BY 1'; exception when others then null; -end; \ No newline at end of file +end; +/ +declare + object_exists exception; + pragma exception_init (object_exists , -00955); + begin + execute immediate 'CREATE SEQUENCE GP_PRICING_ESPEC_OCUP_SEQ START WITH 1 INCREMENT BY 1'; + exception when others then null; +end; + diff --git a/src/db/migration/V20191014_1500__mantis14991.sql b/src/db/migration/V20191014_1500__mantis14991.sql index 9c6e0264e..c2c3cf265 100644 --- a/src/db/migration/V20191014_1500__mantis14991.sql +++ b/src/db/migration/V20191014_1500__mantis14991.sql @@ -116,7 +116,7 @@ declare object_exists exception; pragma exception_init (object_exists , -00955); begin - execute immediate 'CREATE TABLE GP_PRICING_ESPECIFICO_OCUPACION + execute immediate 'CREATE TABLE GP_PRICING_ESPEC_OCUPACION ( PRICINGESPECIFICOOCUPACION_ID NUMBER(7, 0) NOT NULL , PRICINGESPECIFICO_ID NUMBER(7, 0) @@ -135,8 +135,8 @@ declare column_exists exception; pragma exception_init (column_exists , -02275); begin - execute immediate 'ALTER TABLE GP_PRICING_ESPECIFICO_OCUPACION -ADD CONSTRAINT GP_PRICING_ESPECIFICO_OCUPACION FOREIGN KEY + execute immediate 'ALTER TABLE GP_PRICING_ESPEC_OCUPACION +ADD CONSTRAINT GP_PRICING_ESPEC_OCUPACION FOREIGN KEY ( PRICINGESPECIFICO_ID )