blob: 21bb289bae787bbf6c2f370afecbd0b3c57b6929 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
<?php
declare(strict_types=1);
namespace OCA\Richdocuments\Migration;
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version30717Date20210310164901 extends SimpleMigrationStep {
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
$table = $schema->getTable('richdocuments_wopi');
if (!$table->hasColumn('token_type')) {
$table->addColumn('token_type', 'integer', [
'notnull' => false,
'length' => 4,
'default' => 0,
]);
}
if ($table->hasColumn('is_remote_token')) {
$table->dropColumn('is_remote_token');
}
return $schema;
}
}
|