From fa83d3d283f203d47034d3b150ecf6a186b4095c Mon Sep 17 00:00:00 2001 From: FyloZ Date: Tue, 23 Mar 2021 17:48:48 -0400 Subject: [PATCH] =?UTF-8?q?Ajout=20de=20la=20version=204=20de=20la=20base?= =?UTF-8?q?=20de=20donn=C3=A9e:=20*=20Information=20des=20recettes=20sp?= =?UTF-8?q?=C3=A9cifique=20aux=20groupes=20*=20Position=20dans=20les=20?= =?UTF-8?q?=C3=A9tapes=20des=20recettes=20*=20Position=20dans=20les=20ingr?= =?UTF-8?q?=C3=A9dient=20d'un=20m=C3=A9lange?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle.kts | 2 +- .../databasemanager/Properties.kt | 2 +- src/main/resources/changelogs/changelog.4.xml | 79 +++++++++++++++++++ .../changelogs/changelog.master.4.xml | 11 +++ 4 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/changelogs/changelog.4.xml create mode 100644 src/main/resources/changelogs/changelog.master.4.xml diff --git a/build.gradle.kts b/build.gradle.kts index 29cc566..9863975 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,7 +1,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile group = "dev.fyloz.colorrecipesexplorer" -version = "1.1.1" +version = "1.2.0" plugins { kotlin("jvm") version "1.4.30" diff --git a/src/main/kotlin/dev/fyloz/colorrecipesexplorer/databasemanager/Properties.kt b/src/main/kotlin/dev/fyloz/colorrecipesexplorer/databasemanager/Properties.kt index 203f490..2ba5e6c 100644 --- a/src/main/kotlin/dev/fyloz/colorrecipesexplorer/databasemanager/Properties.kt +++ b/src/main/kotlin/dev/fyloz/colorrecipesexplorer/databasemanager/Properties.kt @@ -5,7 +5,7 @@ import java.io.FileInputStream import java.util.* /** The latest version of the database supported by the utility. The [DatabaseUpdaterProperties] target version cannot be higher than this. */ -internal const val LATEST_DATABASE_VERSION = 3 +internal const val LATEST_DATABASE_VERSION = 4 /** The key of the target version property */ internal const val PROPERTY_TARGET_VERSION = "database.target-version" diff --git a/src/main/resources/changelogs/changelog.4.xml b/src/main/resources/changelogs/changelog.4.xml new file mode 100644 index 0000000..2fb1554 --- /dev/null +++ b/src/main/resources/changelogs/changelog.4.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO recipe_group_information (group_id, note, recipe_id) + SELECT g.id, r.note, r.id + FROM + (SELECT id, note FROM recipe) as r, + (SELECT id FROM employee_group ORDER BY id LIMIT 1) as g + + + UPDATE recipe_step s + INNER JOIN recipe_group_information rgi ON rgi.recipe_id=s.recipe_id + SET recipe_group_information_id=rgi.id + + + + + + + + + + + + + + + + + + + + metadata_key='version' + + + + + metadata_key='version' + + + + diff --git a/src/main/resources/changelogs/changelog.master.4.xml b/src/main/resources/changelogs/changelog.master.4.xml new file mode 100644 index 0000000..0e8e890 --- /dev/null +++ b/src/main/resources/changelogs/changelog.master.4.xml @@ -0,0 +1,11 @@ + + + + + + +