Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe Commits: 5a81d27c by tchemit at 2019-09-12T10:27:45Z [LL] Une marée provoque un dépassement mémoire et/ou a un souci de commentaires trop longs - Closes #1373 - - - - - 9 changed files: - + persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_2.java - + persistence/src/main/resources/db/migration/7.2/01_fix_trip_longline_comment-H2.sql - + persistence/src/main/resources/db/migration/7.2/01_fix_trip_longline_comment-PG.sql - pom.xml - + test/src/main/resources/db/7.2/dataForTestLongline.sql.gz - + test/src/main/resources/db/7.2/dataForTestSeine.sql.gz - + test/src/main/resources/db/7.2/empty_h2.sql.gz - + test/src/main/resources/db/7.2/empty_pg.sql.gz - + test/src/main/resources/db/7.2/referentiel.sql.gz Changes: ===================================== persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_7_2.java ===================================== @@ -0,0 +1,43 @@ +package fr.ird.observe.persistence.migration; + +/*- + * #%L + * ObServe :: Persistence + * %% + * Copyright (C) 2008 - 2019 IRD, Code Lutin, Ultreia.io + * %% + * 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% + */ + +import com.google.auto.service.AutoService; +import org.nuiton.topia.service.migration.resources.MigrationVersionResource; +import org.nuiton.topia.service.migration.resources.MigrationVersionResourceExecutor; +import org.nuiton.version.Versions; + +@AutoService(MigrationVersionResource.class) +public class DataSourceMigrationForVersion_7_2 extends MigrationVersionResource { + + public DataSourceMigrationForVersion_7_2() { + super(Versions.valueOf("7.2")); + } + + @Override + public void generateSqlScript(MigrationVersionResourceExecutor executor) { + executor.addScript("01", "fix_trip_longline_comment"); + } + +} + ===================================== persistence/src/main/resources/db/migration/7.2/01_fix_trip_longline_comment-H2.sql ===================================== @@ -0,0 +1,25 @@ +--- +-- #%L +-- ObServe :: Persistence +-- %% +-- Copyright (C) 2008 - 2019 IRD, Code Lutin, Ultreia.io +-- %% +-- 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_longline.trip ADD COLUMN comment2 VARCHAR(1025); +UPDATE observe_longline.trip set comment2 = comment; +ALTER TABLE observe_longline.trip DROP COLUMN comment; +ALTER TABLE observe_longline.trip comment2 RENAME TO comment; ===================================== persistence/src/main/resources/db/migration/7.2/01_fix_trip_longline_comment-PG.sql ===================================== @@ -0,0 +1,25 @@ +--- +-- #%L +-- ObServe :: Persistence +-- %% +-- Copyright (C) 2008 - 2019 IRD, Code Lutin, Ultreia.io +-- %% +-- 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_longline.trip ADD COLUMN comment2 VARCHAR(1025); +UPDATE observe_longline.trip set comment2 = comment; +ALTER TABLE observe_longline.trip DROP COLUMN comment CASCADE; +ALTER TABLE observe_longline.trip RENAME comment2 TO comment; ===================================== pom.xml ===================================== @@ -149,7 +149,7 @@ <devMode>true</devMode> <!--persistence model version--> - <observe.model.version>7.1</observe.model.version> + <observe.model.version>7.2</observe.model.version> <!-- build timestamp configuration --> <maven.build.timestamp.format>dd/MM/yyyy HH:mm z</maven.build.timestamp.format> ===================================== test/src/main/resources/db/7.2/dataForTestLongline.sql.gz ===================================== Binary files /dev/null and b/test/src/main/resources/db/7.2/dataForTestLongline.sql.gz differ ===================================== test/src/main/resources/db/7.2/dataForTestSeine.sql.gz ===================================== Binary files /dev/null and b/test/src/main/resources/db/7.2/dataForTestSeine.sql.gz differ ===================================== test/src/main/resources/db/7.2/empty_h2.sql.gz ===================================== Binary files /dev/null and b/test/src/main/resources/db/7.2/empty_h2.sql.gz differ ===================================== test/src/main/resources/db/7.2/empty_pg.sql.gz ===================================== Binary files /dev/null and b/test/src/main/resources/db/7.2/empty_pg.sql.gz differ ===================================== test/src/main/resources/db/7.2/referentiel.sql.gz ===================================== Binary files /dev/null and b/test/src/main/resources/db/7.2/referentiel.sql.gz differ View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/5a81d27c55d57599dcd75a348a81... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/5a81d27c55d57599dcd75a348a81... You're receiving this email because of your account on gitlab.com.
participants (1)
-
Tony CHEMIT