This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository observe. See http://git.codelutin.com/observe.git commit f312098add8416aa95d67bc5d44442de9c782057 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed May 27 17:38:41 2015 +0200 reajout de certaines migrations de la 4.0-RC3 (refs 7153) --- .../migration/AbstractDataSourceMigration.java | 4 +- .../DataSourceMigrationForVersion_4_0_RC7.java | 64 ++++++++++++++++++++++ .../db/4.0-RC7/rename-unknown-longliner-H2.sql | 22 ++++++++ .../db/4.0-RC7/rename-unknown-longliner-PG.sql | 22 ++++++++ .../db/4.0-RC7/update-senne-gear-usedInTrip-H2.sql | 22 ++++++++ .../db/4.0-RC7/update-senne-gear-usedInTrip-PG.sql | 22 ++++++++ 6 files changed, 155 insertions(+), 1 deletion(-) 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 e1c4d98..f5fbe9b 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 @@ -83,9 +83,11 @@ public abstract class AbstractDataSourceMigration extends TopiaMigrationCallback public static final Version V_4_0_RC6 = Versions.valueOf("4.0-RC6"); + public static final Version V_4_0_RC7 = Versions.valueOf("4.0-RC7"); + /** 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_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 }; private static Supplier<ApplicationConfig> applicationConfigSupplier; diff --git a/observe-entities/src/main/java/fr/ird/observe/entities/migration/versions/DataSourceMigrationForVersion_4_0_RC7.java b/observe-entities/src/main/java/fr/ird/observe/entities/migration/versions/DataSourceMigrationForVersion_4_0_RC7.java new file mode 100644 index 0000000..90a62d7 --- /dev/null +++ b/observe-entities/src/main/java/fr/ird/observe/entities/migration/versions/DataSourceMigrationForVersion_4_0_RC7.java @@ -0,0 +1,64 @@ +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.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.nuiton.topia.TopiaException; +import org.nuiton.topia.framework.TopiaContextImplementor; + +import java.util.List; + +/** + * Created on 5/27/15. + * + * @author Tony Chemit - chemit@codelutin.com + * @since 4.0-RC7 + */ +public abstract class DataSourceMigrationForVersion_4_0_RC7 extends AbstractObserveMigrationCallBack { + + /** Logger. */ + private static final Log log = LogFactory.getLog(DataSourceMigrationForVersion_4_0_RC7.class); + + public DataSourceMigrationForVersion_4_0_RC7(AbstractDataSourceMigration callBack, String scriptSuffix) { + super(AbstractDataSourceMigration.V_4_0_RC7, callBack, scriptSuffix); + } + + @Override + protected void prepareMigrationScript(TopiaContextImplementor tx, + List<String> queries, + boolean showSql, + boolean showProgression) throws TopiaException { + + + // See https://forge.codelutin.com/issues/6983 + // Should have been donne in RC3, but was missed! + addScript("update-senne-gear-usedInTrip", queries); + + // See https://forge.codelutin.com/issues/6991 + // Should have been donne in RC3, but was missed! + addScript("rename-unknown-longliner", queries); + + } + + public static class H2DataSourceMigrationForVersion extends DataSourceMigrationForVersion_4_0_RC7 { + + public H2DataSourceMigrationForVersion(AbstractDataSourceMigration callBack) { + super(callBack, H2DataSourceMigration.TYPE); + } + + } + + public static class PGDataSourceMigrationForVersion extends DataSourceMigrationForVersion_4_0_RC7 { + + public PGDataSourceMigrationForVersion(AbstractDataSourceMigration callBack) { + super(callBack, PGDataSourceMigration.TYPE); + } + + } + + +} + diff --git a/observe-entities/src/main/resources/db/4.0-RC7/rename-unknown-longliner-H2.sql b/observe-entities/src/main/resources/db/4.0-RC7/rename-unknown-longliner-H2.sql new file mode 100644 index 0000000..0aaa32f --- /dev/null +++ b/observe-entities/src/main/resources/db/4.0-RC7/rename-unknown-longliner-H2.sql @@ -0,0 +1,22 @@ +--- +-- #%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% +--- +UPDATE OBSERVE_COMMON.VESSEL SET LABEL2= 'Palengrier inconnu', TOPIAVERSION = TOPIAVERSION + 1 WHERE TOPIAID ='fr.ird.observe.entities.referentiel.Vessel#1239832686129#0.1'; \ No newline at end of file diff --git a/observe-entities/src/main/resources/db/4.0-RC7/rename-unknown-longliner-PG.sql b/observe-entities/src/main/resources/db/4.0-RC7/rename-unknown-longliner-PG.sql new file mode 100644 index 0000000..0aaa32f --- /dev/null +++ b/observe-entities/src/main/resources/db/4.0-RC7/rename-unknown-longliner-PG.sql @@ -0,0 +1,22 @@ +--- +-- #%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% +--- +UPDATE OBSERVE_COMMON.VESSEL SET LABEL2= 'Palengrier inconnu', TOPIAVERSION = TOPIAVERSION + 1 WHERE TOPIAID ='fr.ird.observe.entities.referentiel.Vessel#1239832686129#0.1'; \ No newline at end of file diff --git a/observe-entities/src/main/resources/db/4.0-RC7/update-senne-gear-usedInTrip-H2.sql b/observe-entities/src/main/resources/db/4.0-RC7/update-senne-gear-usedInTrip-H2.sql new file mode 100644 index 0000000..f39c6a5 --- /dev/null +++ b/observe-entities/src/main/resources/db/4.0-RC7/update-senne-gear-usedInTrip-H2.sql @@ -0,0 +1,22 @@ +--- +-- #%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% +--- +UPDATE observe_seine.gearusefeatures SET usedintrip = true, topiaversion = topiaversion + 1 WHERE gear = 'fr.ird.observe.entities.referentiel.Gear#1239832686125#0.20'; \ No newline at end of file diff --git a/observe-entities/src/main/resources/db/4.0-RC7/update-senne-gear-usedInTrip-PG.sql b/observe-entities/src/main/resources/db/4.0-RC7/update-senne-gear-usedInTrip-PG.sql new file mode 100644 index 0000000..1f3d7eb --- /dev/null +++ b/observe-entities/src/main/resources/db/4.0-RC7/update-senne-gear-usedInTrip-PG.sql @@ -0,0 +1,22 @@ +--- +-- #%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% +--- +UPDATE observe_seine.gearusefeatures SET usedintrip = true , topiaversion = topiaversion + 1 WHERE gear = 'fr.ird.observe.entities.referentiel.Gear#1239832686125#0.20'; \ No newline at end of file -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.