diff --git a/src/db/migration/V20180814_1625__mantis11684.sql b/src/db/migration/V20180814_1625__mantis11684.sql new file mode 100644 index 000000000..32f1bb138 --- /dev/null +++ b/src/db/migration/V20180814_1625__mantis11684.sql @@ -0,0 +1,9 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE CATEGORIA ADD (INTEGRADOTOTVS NUMBER(1,0))'; + execute immediate 'ALTER TABLE CATEGORIA ADD (ERRO VARCHAR2(4000 BYTE))'; + exception when column_exists then null; +end; +/ diff --git a/src/db/postgresql/migration/V20180814_1625__mantis11684.sql b/src/db/postgresql/migration/V20180814_1625__mantis11684.sql new file mode 100644 index 000000000..3f4cc986c --- /dev/null +++ b/src/db/postgresql/migration/V20180814_1625__mantis11684.sql @@ -0,0 +1,8 @@ +DO $$ +BEGIN + ALTER TABLE CATEGORIA ADD COLUMN INTEGRADOTOTVS NUMERIC(1,0); + ALTER TABLE CATEGORIA ADD COLUMN ERRO VARCHAR(4000); + + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$;