Version1004Date20170924124212.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCA\DAV\Migration;
  7. use OCP\DB\ISchemaWrapper;
  8. use OCP\Migration\IOutput;
  9. use OCP\Migration\SimpleMigrationStep;
  10. class Version1004Date20170924124212 extends SimpleMigrationStep {
  11. /**
  12. * @param IOutput $output
  13. * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
  14. * @param array $options
  15. * @return null|ISchemaWrapper
  16. * @since 13.0.0
  17. */
  18. public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
  19. /** @var ISchemaWrapper $schema */
  20. $schema = $schemaClosure();
  21. $table = $schema->getTable('cards');
  22. // Dropped in Version1030Date20240205103243 because cards_abid is redundant with cards_abiduri
  23. // $table->addIndex(['addressbookid'], 'cards_abid');
  24. $table->addIndex(['addressbookid', 'uri'], 'cards_abiduri');
  25. $table = $schema->getTable('cards_properties');
  26. $table->addIndex(['addressbookid'], 'cards_prop_abid');
  27. return $schema;
  28. }
  29. }