diff --git a/src/db/migration/V20211015_1113__mantis23444.sql b/src/db/migration/V20211015_1113__mantis23444.sql new file mode 100644 index 000000000..e46bef6ab --- /dev/null +++ b/src/db/migration/V20211015_1113__mantis23444.sql @@ -0,0 +1,15 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE BOLETO ADD (ASIENTOS_LIBRES NUMBER(5), ASIENTOS_OCUP NUMBER(5))'; + exception when column_exists then null; +end; +/ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE CAJA ADD (ASIENTOS_LIBRES NUMBER(5), ASIENTOS_OCUP NUMBER(5))'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20211015_1113__mantis23444.sql b/src/db/postgresql/migration/V20211015_1113__mantis23444.sql new file mode 100644 index 000000000..65bb3f6b3 --- /dev/null +++ b/src/db/postgresql/migration/V20211015_1113__mantis23444.sql @@ -0,0 +1,13 @@ +DO $$ +BEGIN + ALTER TABLE BOLETO ADD (ASIENTOS_LIBRES NUMBER(5), ASIENTOS_OCUP NUMBER(5)); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; +/ +DO $$ +BEGIN + ALTER TABLE CAJA ADD (ASIENTOS_LIBRES NUMBER(5), ASIENTOS_OCUP NUMBER(5)); + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file