diff --git a/src/db/migration/V20181019_1036__mantis12394.sql b/src/db/migration/V20181019_1036__mantis12394.sql new file mode 100644 index 000000000..690d47953 --- /dev/null +++ b/src/db/migration/V20181019_1036__mantis12394.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'ALTER TABLE PARADA ADD (CODANTTAUX NUMBER(5))'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/migration/V20181019_1044__mantis12394.sql b/src/db/migration/V20181019_1044__mantis12394.sql new file mode 100644 index 000000000..dd0daf765 --- /dev/null +++ b/src/db/migration/V20181019_1044__mantis12394.sql @@ -0,0 +1,7 @@ +declare + column_exists exception; + pragma exception_init (column_exists , -01430); +begin + execute immediate 'update parada set CODANTTAUX = CODANTT'; + exception when column_exists then null; +end; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20181019_1038__mantis12394.sql b/src/db/postgresql/migration/V20181019_1038__mantis12394.sql new file mode 100644 index 000000000..d58ca045a --- /dev/null +++ b/src/db/postgresql/migration/V20181019_1038__mantis12394.sql @@ -0,0 +1,7 @@ +DO $$ +BEGIN + ALTER TABLE PARADA ADD (CODANTTAUX NUMBER(5)); + + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file diff --git a/src/db/postgresql/migration/V20181019_1045__mantis12394.sql b/src/db/postgresql/migration/V20181019_1045__mantis12394.sql new file mode 100644 index 000000000..4e05102c8 --- /dev/null +++ b/src/db/postgresql/migration/V20181019_1045__mantis12394.sql @@ -0,0 +1,7 @@ +DO $$ +BEGIN + update parada set CODANTTAUX = CODANTT; + + EXCEPTION WHEN duplicate_column THEN NULL; +END +$$; \ No newline at end of file