|
1
|
|
|
<?php |
|
2
|
|
|
namespace OC\Core\Migrations; |
|
3
|
|
|
|
|
4
|
|
|
use Doctrine\DBAL\Schema\Schema; |
|
5
|
|
|
use OCP\Migration\SimpleMigrationStep; |
|
6
|
|
|
use OCP\Migration\IOutput; |
|
7
|
|
|
|
|
8
|
|
|
/** |
|
9
|
|
|
* Auto-generated migration step: Please modify to your needs! |
|
10
|
|
|
*/ |
|
11
|
|
|
class Version13000Date20170919121250 extends SimpleMigrationStep { |
|
12
|
|
|
|
|
13
|
|
|
/** |
|
14
|
|
|
* @param IOutput $output |
|
15
|
|
|
* @param \Closure $schemaClosure The `\Closure` returns a `Schema` |
|
16
|
|
|
* @param array $options |
|
17
|
|
|
* @since 13.0.0 |
|
18
|
|
|
*/ |
|
19
|
|
|
public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) { |
|
20
|
|
|
} |
|
21
|
|
|
|
|
22
|
|
|
/** |
|
23
|
|
|
* @param IOutput $output |
|
24
|
|
|
* @param \Closure $schemaClosure The `\Closure` returns a `Schema` |
|
25
|
|
|
* @param array $options |
|
26
|
|
|
* @return null|Schema |
|
27
|
|
|
* @since 13.0.0 |
|
28
|
|
|
*/ |
|
29
|
|
|
public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
30
|
|
|
/** @var Schema $schema */ |
|
31
|
|
|
$schema = $schemaClosure(); |
|
32
|
|
|
|
|
33
|
|
|
$table = $schema->getTable('jobs'); |
|
34
|
|
|
$column = $table->getColumn('id'); |
|
35
|
|
|
$column->setUnsigned(true); |
|
36
|
|
|
|
|
37
|
|
|
$table = $schema->getTable('authtoken'); |
|
38
|
|
|
$column = $table->getColumn('id'); |
|
39
|
|
|
$column->setUnsigned(true); |
|
40
|
|
|
$column = $table->getColumn('type'); |
|
41
|
|
|
$column->setUnsigned(true); |
|
42
|
|
|
$column = $table->getColumn('remember'); |
|
43
|
|
|
$column->setUnsigned(true); |
|
44
|
|
|
$column = $table->getColumn('last_activity'); |
|
45
|
|
|
$column->setUnsigned(true); |
|
46
|
|
|
$column = $table->getColumn('last_check'); |
|
47
|
|
|
$column->setUnsigned(true); |
|
48
|
|
|
|
|
49
|
|
|
$table = $schema->getTable('bruteforce_attempts'); |
|
50
|
|
|
$column = $table->getColumn('id'); |
|
51
|
|
|
$column->setUnsigned(true); |
|
52
|
|
|
$column = $table->getColumn('occurred'); |
|
53
|
|
|
$column->setUnsigned(true); |
|
54
|
|
|
|
|
55
|
|
|
$table = $schema->getTable('comments'); |
|
56
|
|
|
$column = $table->getColumn('id'); |
|
57
|
|
|
$column->setUnsigned(true); |
|
58
|
|
|
$column = $table->getColumn('parent_id'); |
|
59
|
|
|
$column->setUnsigned(true); |
|
60
|
|
|
$column = $table->getColumn('topmost_parent_id'); |
|
61
|
|
|
$column->setUnsigned(true); |
|
62
|
|
|
$column = $table->getColumn('children_count'); |
|
63
|
|
|
$column->setUnsigned(true); |
|
64
|
|
|
|
|
65
|
|
|
$table = $schema->getTable('file_locks'); |
|
66
|
|
|
$column = $table->getColumn('id'); |
|
67
|
|
|
$column->setUnsigned(true); |
|
68
|
|
|
|
|
69
|
|
|
$table = $schema->getTable('systemtag'); |
|
70
|
|
|
$column = $table->getColumn('id'); |
|
71
|
|
|
$column->setUnsigned(true); |
|
72
|
|
|
|
|
73
|
|
|
$table = $schema->getTable('systemtag_object_mapping'); |
|
74
|
|
|
$column = $table->getColumn('systemtagid'); |
|
75
|
|
|
$column->setUnsigned(true); |
|
76
|
|
|
|
|
77
|
|
|
$table = $schema->getTable('systemtag_group'); |
|
78
|
|
|
$column = $table->getColumn('systemtagid'); |
|
79
|
|
|
$column->setUnsigned(true); |
|
80
|
|
|
|
|
81
|
|
|
$table = $schema->getTable('vcategory'); |
|
82
|
|
|
$column = $table->getColumn('id'); |
|
83
|
|
|
$column->setUnsigned(true); |
|
84
|
|
|
|
|
85
|
|
|
$table = $schema->getTable('vcategory_to_object'); |
|
86
|
|
|
$column = $table->getColumn('objid'); |
|
87
|
|
|
$column->setUnsigned(true); |
|
88
|
|
|
$column = $table->getColumn('categoryid'); |
|
89
|
|
|
$column->setUnsigned(true); |
|
90
|
|
|
|
|
91
|
|
|
return $schema; |
|
92
|
|
|
} |
|
93
|
|
|
|
|
94
|
|
|
/** |
|
95
|
|
|
* @param IOutput $output |
|
96
|
|
|
* @param \Closure $schemaClosure The `\Closure` returns a `Schema` |
|
97
|
|
|
* @param array $options |
|
98
|
|
|
* @since 13.0.0 |
|
99
|
|
|
*/ |
|
100
|
|
|
public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) { |
|
101
|
|
|
} |
|
102
|
|
|
} |
|
103
|
|
|
|