123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <?php
- declare(strict_types=1);
- namespace OCA\DAV\Migration;
- use Closure;
- use OCP\DB\ISchemaWrapper;
- use OCP\DB\Types;
- use OCP\Migration\IOutput;
- use OCP\Migration\SimpleMigrationStep;
- class Version1011Date20190806104428 extends SimpleMigrationStep {
-
- public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
-
- $schema = $schemaClosure();
- $table = $schema->createTable('dav_cal_proxy');
- $table->addColumn('id', Types::BIGINT, [
- 'autoincrement' => true,
- 'notnull' => true,
- 'length' => 11,
- 'unsigned' => true,
- ]);
- $table->addColumn('owner_id', Types::STRING, [
- 'notnull' => true,
- 'length' => 64,
- ]);
- $table->addColumn('proxy_id', Types::STRING, [
- 'notnull' => true,
- 'length' => 64,
- ]);
- $table->addColumn('permissions', Types::INTEGER, [
- 'notnull' => false,
- 'length' => 4,
- 'unsigned' => true,
- ]);
- $table->setPrimaryKey(['id']);
- $table->addUniqueIndex(['owner_id', 'proxy_id', 'permissions'], 'dav_cal_proxy_uidx');
- $table->addIndex(['proxy_id'], 'dav_cal_proxy_ipid');
- return $schema;
- }
- }
|