You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Version1008Date20181030113700.php 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2018, John Molakvoæ (skjnldsv@protonmail.com)
  4. *
  5. * @author Daniel Kesselberg <mail@danielkesselberg.de>
  6. * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
  7. * @author Roeland Jago Douma <roeland@famdouma.nl>
  8. *
  9. * @license GNU AGPL version 3 or any later version
  10. *
  11. * This program is free software: you can redistribute it and/or modify
  12. * it under the terms of the GNU Affero General Public License as
  13. * published by the Free Software Foundation, either version 3 of the
  14. * License, or (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU Affero General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU Affero General Public License
  22. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  23. *
  24. */
  25. declare(strict_types=1);
  26. namespace OCA\DAV\Migration;
  27. use Closure;
  28. use Doctrine\DBAL\Types\Types;
  29. use OCP\DB\ISchemaWrapper;
  30. use OCP\Migration\IOutput;
  31. use OCP\Migration\SimpleMigrationStep;
  32. class Version1008Date20181030113700 extends SimpleMigrationStep {
  33. /**
  34. * @param IOutput $output
  35. * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
  36. * @param array $options
  37. * @return null|ISchemaWrapper
  38. */
  39. public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
  40. /** @var ISchemaWrapper $schema */
  41. $schema = $schemaClosure();
  42. $table = $schema->getTable('cards');
  43. $table->addColumn('uid', Types::STRING, [
  44. 'notnull' => false,
  45. 'length' => 255
  46. ]);
  47. return $schema;
  48. }
  49. }