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:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2018-07-10 13:01:17 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2018-07-24 14:56:25 +0300
commit49fd17ff145c20d987a355518e36f2dfded2fc96 (patch)
treee500f2c362428c3a27f95746106acdaa0eac7004 /core/Migrations
parentdfe6c1b7e2a179a0c7aee0f43a722bf1e3e3cf3d (diff)
Add "password_by_talk" column to "share" table in the database
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'core/Migrations')
-rw-r--r--core/Migrations/Version14000Date20180710092004.php48
1 files changed, 48 insertions, 0 deletions
diff --git a/core/Migrations/Version14000Date20180710092004.php b/core/Migrations/Version14000Date20180710092004.php
new file mode 100644
index 00000000000..d2e364063ce
--- /dev/null
+++ b/core/Migrations/Version14000Date20180710092004.php
@@ -0,0 +1,48 @@
+<?php
+declare(strict_types=1);
+
+/**
+ *
+ * @copyright Copyright (c) 2018, Daniel Calviño Sánchez (danxuliu@gmail.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 Doctrine\DBAL\Types\Type;
+use OCP\DB\ISchemaWrapper;
+use OCP\Migration\SimpleMigrationStep;
+use OCP\Migration\IOutput;
+
+class Version14000Date20180710092004 extends SimpleMigrationStep {
+
+ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
+ /** @var ISchemaWrapper $schema */
+ $schema = $schemaClosure();
+
+ $table = $schema->getTable('share');
+
+ if (!$table->hasColumn('password_by_talk')) {
+ $table->addColumn('password_by_talk', Type::BOOLEAN, [
+ 'default' => 0,
+ ]);
+ }
+
+ return $schema;
+ }
+}