Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-02-02 18:12:57 +0300
committerRobin Appelman <robin@icewind.nl>2022-02-23 20:02:33 +0300
commitcfb7923e08ba1902fa5a5f72205cfcbb767b54ad (patch)
tree1641f6d5c32d3e4c822bac90ceab2d6f326797b6 /core/Migrations
parent692da9236bde4a0d6d78cf8ee44bd574fec5b623 (diff)
store mountprovider for each mount in the mounts table
this enabled more fine grained filesystem setup Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'core/Migrations')
-rw-r--r--core/Migrations/Version240000Date20220202150027.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/core/Migrations/Version240000Date20220202150027.php b/core/Migrations/Version240000Date20220202150027.php
new file mode 100644
index 00000000000..b13afa67d1e
--- /dev/null
+++ b/core/Migrations/Version240000Date20220202150027.php
@@ -0,0 +1,37 @@
+<?php
+
+declare(strict_types=1);
+
+namespace OC\Core\Migrations;
+
+use Closure;
+use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
+use OCP\Migration\IOutput;
+use OCP\Migration\SimpleMigrationStep;
+
+/**
+ * Auto-generated migration step: Please modify to your needs!
+ */
+class Version240000Date20220202150027 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();
+
+ $table = $schema->getTable('mounts');
+ if (!$table->hasColumn('mount_provider_class')) {
+ $table->addColumn('mount_provider_class', Types::STRING, [
+ 'notnull' => false,
+ 'length' => 128,
+ ]);
+ return $schema;
+ }
+ return null;
+ }
+}