]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(userstatus): Sync migration version number with app version 40614/head
authorChristoph Wurst <christoph@winzerhof-wurst.at>
Mon, 25 Sep 2023 12:19:23 +0000 (14:19 +0200)
committerChristoph Wurst <christoph@winzerhof-wurst.at>
Tue, 26 Sep 2023 11:11:32 +0000 (13:11 +0200)
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
apps/user_status/composer/composer/autoload_classmap.php
apps/user_status/composer/composer/autoload_static.php
apps/user_status/lib/Migration/Version1003Date20210809144824.php [new file with mode: 0644]
apps/user_status/lib/Migration/Version2301Date20210809144824.php [deleted file]

index 7cfc131ab20b14b90f8162add0ea6851ef0abf63..50a2459e53b8f575f56fd21db1faf7accf7ad3f2 100644 (file)
@@ -30,7 +30,7 @@ return array(
     'OCA\\UserStatus\\Migration\\Version0001Date20200602134824' => $baseDir . '/../lib/Migration/Version0001Date20200602134824.php',
     'OCA\\UserStatus\\Migration\\Version0002Date20200902144824' => $baseDir . '/../lib/Migration/Version0002Date20200902144824.php',
     'OCA\\UserStatus\\Migration\\Version1000Date20201111130204' => $baseDir . '/../lib/Migration/Version1000Date20201111130204.php',
-    'OCA\\UserStatus\\Migration\\Version2301Date20210809144824' => $baseDir . '/../lib/Migration/Version2301Date20210809144824.php',
+    'OCA\\UserStatus\\Migration\\Version1003Date20210809144824' => $baseDir . '/../lib/Migration/Version1003Date20210809144824.php',
     'OCA\\UserStatus\\ResponseDefinitions' => $baseDir . '/../lib/ResponseDefinitions.php',
     'OCA\\UserStatus\\Service\\JSDataService' => $baseDir . '/../lib/Service/JSDataService.php',
     'OCA\\UserStatus\\Service\\PredefinedStatusService' => $baseDir . '/../lib/Service/PredefinedStatusService.php',
index 73de6f1a0f716944abbd48cd557499ac7bc5775c..317f9d18969e18579ef95a73d5ffaa003aed7055 100644 (file)
@@ -45,7 +45,7 @@ class ComposerStaticInitUserStatus
         'OCA\\UserStatus\\Migration\\Version0001Date20200602134824' => __DIR__ . '/..' . '/../lib/Migration/Version0001Date20200602134824.php',
         'OCA\\UserStatus\\Migration\\Version0002Date20200902144824' => __DIR__ . '/..' . '/../lib/Migration/Version0002Date20200902144824.php',
         'OCA\\UserStatus\\Migration\\Version1000Date20201111130204' => __DIR__ . '/..' . '/../lib/Migration/Version1000Date20201111130204.php',
-        'OCA\\UserStatus\\Migration\\Version2301Date20210809144824' => __DIR__ . '/..' . '/../lib/Migration/Version2301Date20210809144824.php',
+        'OCA\\UserStatus\\Migration\\Version1003Date20210809144824' => __DIR__ . '/..' . '/../lib/Migration/Version1003Date20210809144824.php',
         'OCA\\UserStatus\\ResponseDefinitions' => __DIR__ . '/..' . '/../lib/ResponseDefinitions.php',
         'OCA\\UserStatus\\Service\\JSDataService' => __DIR__ . '/..' . '/../lib/Service/JSDataService.php',
         'OCA\\UserStatus\\Service\\PredefinedStatusService' => __DIR__ . '/..' . '/../lib/Service/PredefinedStatusService.php',
diff --git a/apps/user_status/lib/Migration/Version1003Date20210809144824.php b/apps/user_status/lib/Migration/Version1003Date20210809144824.php
new file mode 100644 (file)
index 0000000..ed8a15a
--- /dev/null
@@ -0,0 +1,60 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * @copyright Copyright (c) 2021 Carl Schwan <carl@carlschwan.eu>
+ *
+ * @author Carl Schwan <carl@carlschwan.eu>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+namespace OCA\UserStatus\Migration;
+
+use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
+use OCP\Migration\IOutput;
+use OCP\Migration\SimpleMigrationStep;
+
+/**
+ * @package OCA\UserStatus\Migration
+ */
+class Version1003Date20210809144824 extends SimpleMigrationStep {
+
+       /**
+        * @param IOutput $output
+        * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
+        * @param array $options
+        * @return null|ISchemaWrapper
+        * @since 23.0.0
+        */
+       public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
+               /** @var ISchemaWrapper $schema */
+               $schema = $schemaClosure();
+
+               $statusTable = $schema->getTable('user_status');
+
+               if (!$statusTable->hasColumn('is_backup')) {
+                       $statusTable->addColumn('is_backup', Types::BOOLEAN, [
+                               'notnull' => false,
+                               'default' => false,
+                       ]);
+               }
+
+               return $schema;
+       }
+}
diff --git a/apps/user_status/lib/Migration/Version2301Date20210809144824.php b/apps/user_status/lib/Migration/Version2301Date20210809144824.php
deleted file mode 100644 (file)
index 9473784..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-/**
- * @copyright Copyright (c) 2021 Carl Schwan <carl@carlschwan.eu>
- *
- * @author Carl Schwan <carl@carlschwan.eu>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-namespace OCA\UserStatus\Migration;
-
-use OCP\DB\ISchemaWrapper;
-use OCP\DB\Types;
-use OCP\Migration\IOutput;
-use OCP\Migration\SimpleMigrationStep;
-
-/**
- * @package OCA\UserStatus\Migration
- */
-class Version2301Date20210809144824 extends SimpleMigrationStep {
-
-       /**
-        * @param IOutput $output
-        * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
-        * @param array $options
-        * @return null|ISchemaWrapper
-        * @since 23.0.0
-        */
-       public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
-               /** @var ISchemaWrapper $schema */
-               $schema = $schemaClosure();
-
-               $statusTable = $schema->getTable('user_status');
-
-               $statusTable->addColumn('is_backup', Types::BOOLEAN, [
-                       'notnull' => false,
-                       'default' => false,
-               ]);
-
-               return $schema;
-       }
-}