1
0

Version15000Date20181015062942.php 874 B

123456789101112131415161718192021222324252627282930313233343536
  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 Closure;
  9. use OCP\DB\ISchemaWrapper;
  10. use OCP\Migration\IOutput;
  11. use OCP\Migration\SimpleMigrationStep;
  12. class Version15000Date20181015062942 extends SimpleMigrationStep {
  13. /**
  14. * @param IOutput $output
  15. * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
  16. * @param array $options
  17. * @return null|ISchemaWrapper
  18. */
  19. public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
  20. /** @var ISchemaWrapper $schema */
  21. $schema = $schemaClosure();
  22. $table = $schema->getTable('share');
  23. $table->addColumn('hide_download', 'smallint', [
  24. 'notnull' => false,
  25. 'length' => 1,
  26. 'default' => 0,
  27. ]);
  28. return $schema;
  29. }
  30. }