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:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-12-11 13:17:26 +0300
committerGitHub <noreply@github.com>2019-12-11 13:17:26 +0300
commit9a40ccfbf0c2f4fc3f6dd13ebdb405e048959a0e (patch)
tree24c8817f5b6fa2811bc0e1f4fc66a0b936856a59 /core/Migrations
parent2164ef045f88533cb3ca1df3881c3cb6b78e9018 (diff)
parente29a76bc79dc252b5659e38287f07c56ffa3e314 (diff)
Merge pull request #18224 from nextcloud/bugfix/noid/direct-editing-path
Use file path for direct editing
Diffstat (limited to 'core/Migrations')
-rw-r--r--core/Migrations/Version18000Date20191204114856.php66
1 files changed, 66 insertions, 0 deletions
diff --git a/core/Migrations/Version18000Date20191204114856.php b/core/Migrations/Version18000Date20191204114856.php
new file mode 100644
index 00000000000..fc2edadb18f
--- /dev/null
+++ b/core/Migrations/Version18000Date20191204114856.php
@@ -0,0 +1,66 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>
+ *
+ * @author Julius Härtl <jus@bitgrid.net>
+ *
+ * @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 Doctrine\DBAL\Types\Type;
+use OCP\DB\ISchemaWrapper;
+use OCP\IDBConnection;
+use OCP\Migration\SimpleMigrationStep;
+use OCP\Migration\IOutput;
+
+class Version18000Date20191204114856 extends SimpleMigrationStep {
+
+ /** @var IDBConnection */
+ protected $connection;
+
+ public function __construct(IDBConnection $connection) {
+ $this->connection = $connection;
+ }
+
+ /**
+ * @param IOutput $output
+ * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
+ * @param array $options
+ * @return null|ISchemaWrapper
+ * @throws \Doctrine\DBAL\Schema\SchemaException
+ */
+ public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
+ /** @var ISchemaWrapper $schema */
+ $schema = $schemaClosure();
+ $table = $schema->getTable('direct_edit');
+
+ $table->addColumn('file_path', 'string', [
+ 'notnull' => false,
+ 'length' => 4000,
+ ]);
+
+
+ return $schema;
+ }
+
+}