From f7a642833766520f1a32dfb3fe600ea2fcdc433e Mon Sep 17 00:00:00 2001 From: Baptiste Fotia Date: Mon, 11 Sep 2023 19:07:49 +0200 Subject: [PATCH] feat(php): Rerun the change groupnames for pgsql Rerun the change groupnames for pgsql when the control migration is to false. Signed-off-by: Baptiste Fotia --- appinfo/info.xml | 3 +- .../ReRunChangeGroupnamesForPgSql.php | 45 +++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 lib/Migration/ReRunChangeGroupnamesForPgSql.php diff --git a/appinfo/info.xml b/appinfo/info.xml index 1de4f13a1..f060480c9 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -5,7 +5,7 @@ Workspace - 3.0.3 + 3.0.4-beta agpl @@ -75,6 +75,7 @@ For more details, please go to the [admin documentation](https://github.com/araw OCA\Workspace\Migration\ChangeGroupnamesV300 OCA\Workspace\Migration\FixMigrationToV300 + OCA\Workspace\Migration\ReRunChangeGroupnamesForPgSql OCA\Workspace\Migration\RegisterWorkspaceUsersGroup diff --git a/lib/Migration/ReRunChangeGroupnamesForPgSql.php b/lib/Migration/ReRunChangeGroupnamesForPgSql.php new file mode 100644 index 000000000..027e78fec --- /dev/null +++ b/lib/Migration/ReRunChangeGroupnamesForPgSql.php @@ -0,0 +1,45 @@ +config->getSystemValue('dbtype'); + + if ($sgbdName !== 'pgsql') + { + return; + } + + $statusMigration = boolval($this->appConfig->getAppValue(Upgrade::CONTROL_MIGRATION_V3, '1')); + + if ($statusMigration === true) + { + return; + } + + $this->upgrade->upgrade(); + } +}