]> source.dussan.org Git - nextcloud-server.git/commitdiff
Make sure columns with an empty default are nullable for Oracle
authorJoas Schilling <coding@schilljs.com>
Mon, 9 Nov 2020 09:38:47 +0000 (10:38 +0100)
committerJoas Schilling <coding@schilljs.com>
Thu, 12 Nov 2020 11:57:51 +0000 (12:57 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
41 files changed:
apps/accessibility/composer/composer/ClassLoader.php
apps/admin_audit/composer/composer/ClassLoader.php
apps/cloud_federation_api/composer/composer/ClassLoader.php
apps/comments/composer/composer/ClassLoader.php
apps/contactsinteraction/composer/composer/ClassLoader.php
apps/dav/appinfo/info.xml
apps/dav/composer/composer/ClassLoader.php
apps/dav/composer/composer/autoload_classmap.php
apps/dav/composer/composer/autoload_static.php
apps/dav/lib/Migration/Version1012Date20190808122342.php
apps/dav/lib/Migration/Version1016Date20201109085907.php [new file with mode: 0644]
apps/encryption/composer/composer/ClassLoader.php
apps/federatedfilesharing/composer/composer/ClassLoader.php
apps/federation/composer/composer/ClassLoader.php
apps/files/composer/composer/ClassLoader.php
apps/files_sharing/composer/composer/ClassLoader.php
apps/files_trashbin/composer/composer/ClassLoader.php
apps/files_versions/composer/composer/ClassLoader.php
apps/lookup_server_connector/composer/composer/ClassLoader.php
apps/oauth2/composer/composer/ClassLoader.php
apps/provisioning_api/composer/composer/ClassLoader.php
apps/settings/composer/composer/ClassLoader.php
apps/sharebymail/composer/composer/ClassLoader.php
apps/systemtags/composer/composer/ClassLoader.php
apps/testing/composer/composer/ClassLoader.php
apps/twofactor_backupcodes/composer/composer/ClassLoader.php
apps/updatenotification/composer/composer/ClassLoader.php
apps/user_ldap/composer/composer/ClassLoader.php
apps/user_status/composer/composer/ClassLoader.php
apps/workflowengine/composer/composer/ClassLoader.php
core/Migrations/Version13000Date20170718121200.php
core/Migrations/Version14000Date20180710092004.php
core/Migrations/Version15000Date20180926101451.php
core/Migrations/Version15000Date20181015062942.php
core/Migrations/Version16000Date20190207141427.php
core/Migrations/Version16000Date20190428150708.php
core/Migrations/Version20000Date20201109081915.php [new file with mode: 0644]
lib/composer/composer/ClassLoader.php
lib/composer/composer/autoload_classmap.php
lib/composer/composer/autoload_static.php
version.php

index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index 9eab8e327087e932384a35a2c08de6c796e317b4..b0bcc782d99c6cc700cf45f7a2ee827b7729d918 100644 (file)
@@ -5,7 +5,7 @@
        <name>WebDAV</name>
        <summary>WebDAV endpoint</summary>
        <description>WebDAV endpoint</description>
-       <version>1.16.0</version>
+       <version>1.16.1</version>
        <licence>agpl</licence>
        <author>owncloud.org</author>
        <namespace>DAV</namespace>
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index aaa5e82da04554b9c9efbed1865b0367d0c4e23b..e0684f0c793d847358d6960b1bf3f4532c5256d0 100644 (file)
@@ -230,6 +230,7 @@ return array(
     'OCA\\DAV\\Migration\\Version1011Date20190725113607' => $baseDir . '/../lib/Migration/Version1011Date20190725113607.php',
     'OCA\\DAV\\Migration\\Version1011Date20190806104428' => $baseDir . '/../lib/Migration/Version1011Date20190806104428.php',
     'OCA\\DAV\\Migration\\Version1012Date20190808122342' => $baseDir . '/../lib/Migration/Version1012Date20190808122342.php',
+    'OCA\\DAV\\Migration\\Version1016Date20201109085907' => $baseDir . '/../lib/Migration/Version1016Date20201109085907.php',
     'OCA\\DAV\\Provisioning\\Apple\\AppleProvisioningNode' => $baseDir . '/../lib/Provisioning/Apple/AppleProvisioningNode.php',
     'OCA\\DAV\\Provisioning\\Apple\\AppleProvisioningPlugin' => $baseDir . '/../lib/Provisioning/Apple/AppleProvisioningPlugin.php',
     'OCA\\DAV\\RootCollection' => $baseDir . '/../lib/RootCollection.php',
index 0dc34f5a3172b0ee2222fc50dc9655f580f8d939..32b5e03a3fad7a3f0a8bf9993f6f3061452d2113 100644 (file)
@@ -245,6 +245,7 @@ class ComposerStaticInitDAV
         'OCA\\DAV\\Migration\\Version1011Date20190725113607' => __DIR__ . '/..' . '/../lib/Migration/Version1011Date20190725113607.php',
         'OCA\\DAV\\Migration\\Version1011Date20190806104428' => __DIR__ . '/..' . '/../lib/Migration/Version1011Date20190806104428.php',
         'OCA\\DAV\\Migration\\Version1012Date20190808122342' => __DIR__ . '/..' . '/../lib/Migration/Version1012Date20190808122342.php',
+        'OCA\\DAV\\Migration\\Version1016Date20201109085907' => __DIR__ . '/..' . '/../lib/Migration/Version1016Date20201109085907.php',
         'OCA\\DAV\\Provisioning\\Apple\\AppleProvisioningNode' => __DIR__ . '/..' . '/../lib/Provisioning/Apple/AppleProvisioningNode.php',
         'OCA\\DAV\\Provisioning\\Apple\\AppleProvisioningPlugin' => __DIR__ . '/..' . '/../lib/Provisioning/Apple/AppleProvisioningPlugin.php',
         'OCA\\DAV\\RootCollection' => __DIR__ . '/..' . '/../lib/RootCollection.php',
index 7aa51a224ec0575ddb78ff1ffa5faace9a5b67a4..51929d1a2f5dc007831419d6cdb93a6f81ae4241 100644 (file)
@@ -69,7 +69,7 @@ class Version1012Date20190808122342 extends SimpleMigrationStep {
                                'length' => 11,
                        ]);
                        $table->addColumn('is_recurring', Types::SMALLINT, [
-                               'notnull' => true,
+                               'notnull' => false,
                                'length' => 1,
                        ]);
                        $table->addColumn('uid', Types::STRING, [
diff --git a/apps/dav/lib/Migration/Version1016Date20201109085907.php b/apps/dav/lib/Migration/Version1016Date20201109085907.php
new file mode 100644 (file)
index 0000000..a43c8ae
--- /dev/null
@@ -0,0 +1,60 @@
+<?php
+declare(strict_types=1);
+
+/**
+ * @copyright Copyright (c) 2020 Joas Schilling <coding@schilljs.com>
+ *
+ * @author Joas Schilling <coding@schilljs.com>
+ *
+ * @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\DAV\Migration;
+
+use Closure;
+use OCP\DB\ISchemaWrapper;
+use OCP\Migration\IOutput;
+use OCP\Migration\SimpleMigrationStep;
+
+class Version1016Date20201109085907 extends SimpleMigrationStep {
+       /**
+        * @param IOutput $output
+        * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
+        * @param array $options
+        * @return null|ISchemaWrapper
+        */
+       public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
+               /** @var ISchemaWrapper $schema */
+               $schema = $schemaClosure();
+
+               $result = $this->ensureColumnIsNullable($schema, 'calendar_reminders', 'is_recurring');
+
+               return $result ? $schema : null;
+       }
+
+       protected function ensureColumnIsNullable(ISchemaWrapper $schema, string $tableName, string $columnName): bool {
+               $table = $schema->getTable($tableName);
+               $column = $table->getColumn($columnName);
+
+               if ($column->getNotnull()) {
+                       $column->setNotnull(false);
+                       return true;
+               }
+
+               return false;
+       }
+}
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index f3129c22ca2afa56f7be35c9c377c4607877dddd..fcea6657b30eb088252039e38efd85020de304bd 100644 (file)
@@ -813,7 +813,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep {
                if (!$schema->hasTable('credentials')) {
                        $table = $schema->createTable('credentials');
                        $table->addColumn('user', 'string', [
-                               'notnull' => true,
+                               'notnull' => false,
                                'length' => 64,
                        ]);
                        $table->addColumn('identifier', 'string', [
index 141b0c1afb5af9cef8c354dc401722287ebfbd51..767d8ee5f7dd31d59376fa7ed4db88d7b77e8e21 100644 (file)
@@ -43,6 +43,7 @@ class Version14000Date20180710092004 extends SimpleMigrationStep {
                if (!$table->hasColumn('password_by_talk')) {
                        $table->addColumn('password_by_talk', Types::BOOLEAN, [
                                'default' => 0,
+                               'notnull' => false,
                        ]);
                }
 
index a5f37cc91253e085896dd44ef72c9c27fe9b1428..e03a11318c0ed753b65cc39182ed922403fc9f08 100644 (file)
@@ -45,8 +45,8 @@ class Version15000Date20180926101451 extends SimpleMigrationStep {
 
                $table = $schema->getTable('authtoken');
                $table->addColumn('password_invalid','boolean', [
-                       'notnull' => true,
-                       'default' => false,
+                       'default' => 0,
+                       'notnull' => false,
                ]);
 
                return $schema;
index eaeaf0dd268517c9aaee055533c1514da66a858b..23c2a904741bcd24453b0fb9a03ef883011236e3 100644 (file)
@@ -45,7 +45,7 @@ class Version15000Date20181015062942 extends SimpleMigrationStep {
 
                $table = $schema->getTable('share');
                $table->addColumn('hide_download', 'smallint', [
-                       'notnull' => true,
+                       'notnull' => false,
                        'length' => 1,
                        'default' => 0,
                ]);
index e6235efe20190eabaa47a9906e3a334e8e13acab..63c6c871eae4884d03b049a05119cd985c717218 100644 (file)
@@ -102,7 +102,7 @@ class Version16000Date20190207141427 extends SimpleMigrationStep {
                                'default' => '',
                        ]);
                        $table->addColumn('access', Types::SMALLINT, [
-                               'notnull' => true,
+                               'notnull' => false,
                                'default' => 0,
                        ]);
 
index 546d4c19e14965a717da9e712b48f73e00dcf171..dc33b08035ab7de120140bfa7f48474beaff37c8 100644 (file)
@@ -49,7 +49,7 @@ class Version16000Date20190428150708 extends SimpleMigrationStep {
                if ($schema->hasTable('collres_accesscache')) {
                        $table = $schema->getTable('collres_accesscache');
                        $table->addColumn('access', Types::BOOLEAN, [
-                               'notnull' => true,
+                               'notnull' => false,
                                'default' => false
                        ]);
                }
diff --git a/core/Migrations/Version20000Date20201109081915.php b/core/Migrations/Version20000Date20201109081915.php
new file mode 100644 (file)
index 0000000..720f54d
--- /dev/null
@@ -0,0 +1,64 @@
+<?php
+declare(strict_types=1);
+
+/**
+ * @copyright Copyright (c) 2020 Joas Schilling <coding@schilljs.com>
+ *
+ * @author Joas Schilling <coding@schilljs.com>
+ *
+ * @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 OC\Core\Migrations;
+
+use Closure;
+use OCP\DB\ISchemaWrapper;
+use OCP\Migration\IOutput;
+use OCP\Migration\SimpleMigrationStep;
+
+class Version20000Date20201109081915 extends SimpleMigrationStep {
+       /**
+        * @param IOutput $output
+        * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
+        * @param array $options
+        * @return null|ISchemaWrapper
+        */
+       public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
+               /** @var ISchemaWrapper $schema */
+               $schema = $schemaClosure();
+
+               $result = $this->ensureColumnIsNullable($schema, 'share', 'password_by_talk');
+               $result = $this->ensureColumnIsNullable($schema, 'share', 'hide_download') || $result;
+               $result = $this->ensureColumnIsNullable($schema, 'credentials', 'user') || $result;
+               $result = $this->ensureColumnIsNullable($schema, 'authtoken', 'password_invalid') || $result;
+               $result = $this->ensureColumnIsNullable($schema, 'collres_accesscache', 'access') || $result;
+
+               return $result ? $schema : null;
+       }
+
+       protected function ensureColumnIsNullable(ISchemaWrapper $schema, string $tableName, string $columnName): bool {
+               $table = $schema->getTable($tableName);
+               $column = $table->getColumn($columnName);
+
+               if ($column->getNotnull()) {
+                       $column->setNotnull(false);
+                       return true;
+               }
+
+               return false;
+       }
+}
index fce8549f0781bafdc7da2301b84d048286757445..03b9bb9c40cb86c2c2bbec2ce6ff0ddce9ad586c 100644 (file)
@@ -60,7 +60,7 @@ class ClassLoader
     public function getPrefixes()
     {
         if (!empty($this->prefixesPsr0)) {
-            return call_user_func_array('array_merge', $this->prefixesPsr0);
+            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
         }
 
         return array();
index f28e7977a032c1c56f759950ce488168a9e0e55c..48f9f60999d6b5b546931f55992754d943c30d0d 100644 (file)
@@ -919,6 +919,7 @@ return array(
     'OC\\Core\\Migrations\\Version18000Date20191014105105' => $baseDir . '/core/Migrations/Version18000Date20191014105105.php',
     'OC\\Core\\Migrations\\Version18000Date20191204114856' => $baseDir . '/core/Migrations/Version18000Date20191204114856.php',
     'OC\\Core\\Migrations\\Version19000Date20200211083441' => $baseDir . '/core/Migrations/Version19000Date20200211083441.php',
+    'OC\\Core\\Migrations\\Version20000Date20201109081915' => $baseDir . '/core/Migrations/Version20000Date20201109081915.php',
     'OC\\Core\\Notification\\RemoveLinkSharesNotifier' => $baseDir . '/core/Notification/RemoveLinkSharesNotifier.php',
     'OC\\Core\\Service\\LoginFlowV2Service' => $baseDir . '/core/Service/LoginFlowV2Service.php',
     'OC\\DB\\Adapter' => $baseDir . '/lib/private/DB/Adapter.php',
index e584c63c6445aa04c4bbe50f3db910c9d8381aa3..c6f23f18523b8103fe8ea3b3574e520f6e4a95b1 100644 (file)
@@ -948,6 +948,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
         'OC\\Core\\Migrations\\Version18000Date20191014105105' => __DIR__ . '/../../..' . '/core/Migrations/Version18000Date20191014105105.php',
         'OC\\Core\\Migrations\\Version18000Date20191204114856' => __DIR__ . '/../../..' . '/core/Migrations/Version18000Date20191204114856.php',
         'OC\\Core\\Migrations\\Version19000Date20200211083441' => __DIR__ . '/../../..' . '/core/Migrations/Version19000Date20200211083441.php',
+        'OC\\Core\\Migrations\\Version20000Date20201109081915' => __DIR__ . '/../../..' . '/core/Migrations/Version20000Date20201109081915.php',
         'OC\\Core\\Notification\\RemoveLinkSharesNotifier' => __DIR__ . '/../../..' . '/core/Notification/RemoveLinkSharesNotifier.php',
         'OC\\Core\\Service\\LoginFlowV2Service' => __DIR__ . '/../../..' . '/core/Service/LoginFlowV2Service.php',
         'OC\\DB\\Adapter' => __DIR__ . '/../../..' . '/lib/private/DB/Adapter.php',
index 9b82df9ca0802e9c7a0ef9403e6d6c26ab741d5a..f971a54fa15facf02ef355591f65a55f95d72950 100644 (file)
@@ -29,7 +29,7 @@
 // between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel
 // when updating major/minor version number.
 
-$OC_Version = [20, 0, 1, 1];
+$OC_Version = [20, 0, 1, 4];
 
 // The human readable string
 $OC_VersionString = '20.0.1';