diff --git a/src/db/migration/V20200219_1403__mantis18139.sql b/src/db/migration/V20200219_1403__mantis18139.sql new file mode 100644 index 000000000..124c63a2f --- /dev/null +++ b/src/db/migration/V20200219_1403__mantis18139.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE FORMA_PAGO_DET MODIFY (FORMAPAGO_ID NUMBER(7, 0))'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20200219_1403__mantis18139.sql b/src/db/postgresql/migration/V20200219_1403__mantis18139.sql new file mode 100644 index 000000000..5136c13aa --- /dev/null +++ b/src/db/postgresql/migration/V20200219_1403__mantis18139.sql @@ -0,0 +1,7 @@ +DO $$ +BEGIN + ALTER TABLE FORMA_PAGO_DET ALTER COLUMN FORMAPAGO_ID TYPE NUMERIC(7,0); + + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$;