@@ -35,21 +35,21 @@ |
||
| 35 | 35 | * Auto-generated migration step: Please modify to your needs! |
| 36 | 36 | */ |
| 37 | 37 | class Version21000Date20210119195004 extends SimpleMigrationStep { |
| 38 | - /** |
|
| 39 | - * @param IOutput $output |
|
| 40 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 41 | - * @param array $options |
|
| 42 | - * @return null|ISchemaWrapper |
|
| 43 | - */ |
|
| 44 | - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { |
|
| 45 | - /** @var ISchemaWrapper $schema */ |
|
| 46 | - $schema = $schemaClosure(); |
|
| 38 | + /** |
|
| 39 | + * @param IOutput $output |
|
| 40 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 41 | + * @param array $options |
|
| 42 | + * @return null|ISchemaWrapper |
|
| 43 | + */ |
|
| 44 | + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { |
|
| 45 | + /** @var ISchemaWrapper $schema */ |
|
| 46 | + $schema = $schemaClosure(); |
|
| 47 | 47 | |
| 48 | - $table = $schema->getTable('authtoken'); |
|
| 49 | - if ($table->hasIndex('authtoken_version_index')) { |
|
| 50 | - $table->dropIndex('authtoken_version_index'); |
|
| 51 | - } |
|
| 48 | + $table = $schema->getTable('authtoken'); |
|
| 49 | + if ($table->hasIndex('authtoken_version_index')) { |
|
| 50 | + $table->dropIndex('authtoken_version_index'); |
|
| 51 | + } |
|
| 52 | 52 | |
| 53 | - return $schema; |
|
| 54 | - } |
|
| 53 | + return $schema; |
|
| 54 | + } |
|
| 55 | 55 | } |
@@ -31,24 +31,24 @@ |
||
| 31 | 31 | use OCP\Migration\SimpleMigrationStep; |
| 32 | 32 | |
| 33 | 33 | class Version14000Date20180518120534 extends SimpleMigrationStep { |
| 34 | - public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
| 35 | - /** @var ISchemaWrapper $schema */ |
|
| 36 | - $schema = $schemaClosure(); |
|
| 34 | + public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
| 35 | + /** @var ISchemaWrapper $schema */ |
|
| 36 | + $schema = $schemaClosure(); |
|
| 37 | 37 | |
| 38 | - $table = $schema->getTable('authtoken'); |
|
| 39 | - $table->addColumn('private_key', 'text', [ |
|
| 40 | - 'notnull' => false, |
|
| 41 | - ]); |
|
| 42 | - $table->addColumn('public_key', 'text', [ |
|
| 43 | - 'notnull' => false, |
|
| 44 | - ]); |
|
| 45 | - $table->addColumn('version', 'smallint', [ |
|
| 46 | - 'notnull' => true, |
|
| 47 | - 'default' => 1, |
|
| 48 | - 'unsigned' => true, |
|
| 49 | - ]); |
|
| 50 | - $table->addIndex(['uid'], 'authtoken_uid_index'); |
|
| 38 | + $table = $schema->getTable('authtoken'); |
|
| 39 | + $table->addColumn('private_key', 'text', [ |
|
| 40 | + 'notnull' => false, |
|
| 41 | + ]); |
|
| 42 | + $table->addColumn('public_key', 'text', [ |
|
| 43 | + 'notnull' => false, |
|
| 44 | + ]); |
|
| 45 | + $table->addColumn('version', 'smallint', [ |
|
| 46 | + 'notnull' => true, |
|
| 47 | + 'default' => 1, |
|
| 48 | + 'unsigned' => true, |
|
| 49 | + ]); |
|
| 50 | + $table->addIndex(['uid'], 'authtoken_uid_index'); |
|
| 51 | 51 | |
| 52 | - return $schema; |
|
| 53 | - } |
|
| 52 | + return $schema; |
|
| 53 | + } |
|
| 54 | 54 | } |