This is an automated email from the git hooks/post-receive script. New commit to branch develop-4.x in repository observe. See http://git.codelutin.com/observe.git commit 99af45ff9ad29b3535615447f43b6dac5d6acfc5 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Nov 3 17:25:20 2015 +0100 Ajout de la migration pour supprimer le champs datearriveeport (termine #7542) --- .../src/test/resources/db/4.0.4/referentiel.sql.gz | Bin 0 -> 138244 bytes .../migration/AbstractDataSourceMigration.java | 4 +- .../DataSourceMigrationForVersion_4_0_4.java | 48 +++++++++++++++++++++ .../4.0.4/remove-trip-datearriveeport-field-H2.sql | 23 ++++++++++ .../4.0.4/remove-trip-datearriveeport-field-PG.sql | 23 ++++++++++ .../src/main/xmi/observe-common.properties | 2 +- .../src/main/xmi/observe-longline.properties | 2 +- .../src/main/xmi/observe-seine.properties | 2 +- observe-entities/src/main/xmi/observe-seine.zargo | Bin 85905 -> 85857 bytes 9 files changed, 100 insertions(+), 4 deletions(-) diff --git a/observe-business/src/test/resources/db/4.0.4/referentiel.sql.gz b/observe-business/src/test/resources/db/4.0.4/referentiel.sql.gz new file mode 100644 index 0000000..7cd9cbe Binary files /dev/null and b/observe-business/src/test/resources/db/4.0.4/referentiel.sql.gz differ diff --git a/observe-entities/src/main/java/fr/ird/observe/entities/migration/AbstractDataSourceMigration.java b/observe-entities/src/main/java/fr/ird/observe/entities/migration/AbstractDataSourceMigration.java index 2ea4149..4333afa 100644 --- a/observe-entities/src/main/java/fr/ird/observe/entities/migration/AbstractDataSourceMigration.java +++ b/observe-entities/src/main/java/fr/ird/observe/entities/migration/AbstractDataSourceMigration.java @@ -91,10 +91,12 @@ public abstract class AbstractDataSourceMigration extends TopiaMigrationCallback public static final Version V_4_0_2 = Versions.valueOf("4.0.2"); + public static final Version V_4_0_4 = Versions.valueOf("4.0.4"); + /** Les versions de mise à jour disponibles. */ public static final Version[] availableVersions = new Version[]{ V_3_1, V_3_5, V_3_7, V_3_8, V_3_9, V_3_10, V_3_11, V_3_12, V_3_14, V_3_15, V_3_16, V_4_0_RC2, - V_4_0_RC3, V_4_0_RC4, V_4_0_RC6, V_4_0_RC7, V_4_0, V_4_0_1, V_4_0_2 + V_4_0_RC3, V_4_0_RC4, V_4_0_RC6, V_4_0_RC7, V_4_0, V_4_0_1, V_4_0_2, V_4_0_4 }; private static Supplier<ApplicationConfig> applicationConfigSupplier; diff --git a/observe-entities/src/main/java/fr/ird/observe/entities/migration/versions/DataSourceMigrationForVersion_4_0_4.java b/observe-entities/src/main/java/fr/ird/observe/entities/migration/versions/DataSourceMigrationForVersion_4_0_4.java new file mode 100644 index 0000000..46daf0a --- /dev/null +++ b/observe-entities/src/main/java/fr/ird/observe/entities/migration/versions/DataSourceMigrationForVersion_4_0_4.java @@ -0,0 +1,48 @@ +package fr.ird.observe.entities.migration.versions; + +import fr.ird.observe.entities.migration.AbstractDataSourceMigration; +import fr.ird.observe.entities.migration.AbstractObserveMigrationCallBack; +import fr.ird.observe.entities.migration.H2DataSourceMigration; +import fr.ird.observe.entities.migration.PGDataSourceMigration; +import org.nuiton.topia.TopiaException; +import org.nuiton.topia.framework.TopiaContextImplementor; + +import java.util.List; + +/** + * Created on 03/11/15. + * + * @author Tony Chemit - chemit@codelutin.com + * @since 4.0.4 + */ +public class DataSourceMigrationForVersion_4_0_4 extends AbstractObserveMigrationCallBack { + + public DataSourceMigrationForVersion_4_0_4(AbstractDataSourceMigration callBack, String scriptSuffix) { + super(AbstractDataSourceMigration.V_4_0_4, callBack, scriptSuffix); + } + + @Override + protected void prepareMigrationScript(TopiaContextImplementor tx, List<String> queries, boolean showSql, boolean showProgression) throws TopiaException { + + // supprimer un champs résiduel (Voir http://forge.codelutin.com/issues/7542) + addScript("remove-trip-datearriveeport-field", queries); + + } + + public static class H2DataSourceMigrationForVersion extends DataSourceMigrationForVersion_4_0_4 { + + public H2DataSourceMigrationForVersion(AbstractDataSourceMigration callBack) { + super(callBack, H2DataSourceMigration.TYPE); + } + + } + + public static class PGDataSourceMigrationForVersion extends DataSourceMigrationForVersion_4_0_4 { + + public PGDataSourceMigrationForVersion(AbstractDataSourceMigration callBack) { + super(callBack, PGDataSourceMigration.TYPE); + } + + } + +} diff --git a/observe-entities/src/main/resources/db/4.0.4/remove-trip-datearriveeport-field-H2.sql b/observe-entities/src/main/resources/db/4.0.4/remove-trip-datearriveeport-field-H2.sql new file mode 100644 index 0000000..e029d1f --- /dev/null +++ b/observe-entities/src/main/resources/db/4.0.4/remove-trip-datearriveeport-field-H2.sql @@ -0,0 +1,23 @@ +--- +-- #%L +-- ObServe :: Entities +-- %% +-- Copyright (C) 2008 - 2015 IRD, Codelutin, Tony Chemit +-- %% +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as +-- published by the Free Software Foundation, either version 3 of the +-- License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public +-- License along with this program. If not, see +-- <http://www.gnu.org/licenses/gpl-3.0.html>. +-- #L% +--- + +ALTER TABLE observe_seine.trip DROP COLUMN datearriveeport; \ No newline at end of file diff --git a/observe-entities/src/main/resources/db/4.0.4/remove-trip-datearriveeport-field-PG.sql b/observe-entities/src/main/resources/db/4.0.4/remove-trip-datearriveeport-field-PG.sql new file mode 100644 index 0000000..e029d1f --- /dev/null +++ b/observe-entities/src/main/resources/db/4.0.4/remove-trip-datearriveeport-field-PG.sql @@ -0,0 +1,23 @@ +--- +-- #%L +-- ObServe :: Entities +-- %% +-- Copyright (C) 2008 - 2015 IRD, Codelutin, Tony Chemit +-- %% +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as +-- published by the Free Software Foundation, either version 3 of the +-- License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public +-- License along with this program. If not, see +-- <http://www.gnu.org/licenses/gpl-3.0.html>. +-- #L% +--- + +ALTER TABLE observe_seine.trip DROP COLUMN datearriveeport; \ No newline at end of file diff --git a/observe-entities/src/main/xmi/observe-common.properties b/observe-entities/src/main/xmi/observe-common.properties index 9b32ae1..9227f7e 100644 --- a/observe-entities/src/main/xmi/observe-common.properties +++ b/observe-entities/src/main/xmi/observe-common.properties @@ -19,7 +19,7 @@ # <http://www.gnu.org/licenses/gpl-3.0.html>. # #L% ### -model.tagvalue.version=4.0.2 +model.tagvalue.version=4.0.4 model.tagvalue.notGenerateToString=true model.tagvalue.generateOperatorForDAOHelper=true model.tagvalue.generateStandaloneEnumForDAOHelper=true diff --git a/observe-entities/src/main/xmi/observe-longline.properties b/observe-entities/src/main/xmi/observe-longline.properties index 7a5450e..6187717 100644 --- a/observe-entities/src/main/xmi/observe-longline.properties +++ b/observe-entities/src/main/xmi/observe-longline.properties @@ -19,7 +19,7 @@ # <http://www.gnu.org/licenses/gpl-3.0.html>. # #L% ### -model.tagvalue.version=4.0.2 +model.tagvalue.version=4.0.4 model.tagvalue.notGenerateToString=true model.tagvalue.generateOperatorForDAOHelper=true model.tagvalue.generateStandaloneEnumForDAOHelper=true diff --git a/observe-entities/src/main/xmi/observe-seine.properties b/observe-entities/src/main/xmi/observe-seine.properties index 21d5297..650acc8 100644 --- a/observe-entities/src/main/xmi/observe-seine.properties +++ b/observe-entities/src/main/xmi/observe-seine.properties @@ -19,7 +19,7 @@ # <http://www.gnu.org/licenses/gpl-3.0.html>. # #L% ### -model.tagvalue.version=4.0.2 +model.tagvalue.version=4.0.4 model.tagvalue.notGenerateToString=true model.tagvalue.generateOperatorForDAOHelper=true model.tagvalue.generateStandaloneEnumForDAOHelper=true diff --git a/observe-entities/src/main/xmi/observe-seine.zargo b/observe-entities/src/main/xmi/observe-seine.zargo index 9116a17..d64b15c 100644 Binary files a/observe-entities/src/main/xmi/observe-seine.zargo and b/observe-entities/src/main/xmi/observe-seine.zargo differ -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.