Version14000Date20180710092004.php 755 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OC\Core\Migrations;
  8. use OCP\DB\ISchemaWrapper;
  9. use OCP\DB\Types;
  10. use OCP\Migration\IOutput;
  11. use OCP\Migration\SimpleMigrationStep;
  12. class Version14000Date20180710092004 extends SimpleMigrationStep {
  13. public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
  14. /** @var ISchemaWrapper $schema */
  15. $schema = $schemaClosure();
  16. $table = $schema->getTable('share');
  17. if (!$table->hasColumn('password_by_talk')) {
  18. $table->addColumn('password_by_talk', Types::BOOLEAN, [
  19. 'default' => 0,
  20. 'notnull' => false,
  21. ]);
  22. }
  23. return $schema;
  24. }
  25. }