@@ -35,48 +35,48 @@ |
||
35 | 35 | |
36 | 36 | class Index extends Command { |
37 | 37 | |
38 | - /** @var Manager */ |
|
39 | - private $manager; |
|
38 | + /** @var Manager */ |
|
39 | + private $manager; |
|
40 | 40 | |
41 | - public function __construct(Manager $manager) { |
|
42 | - $this->manager = $manager; |
|
43 | - parent::__construct(); |
|
44 | - } |
|
41 | + public function __construct(Manager $manager) { |
|
42 | + $this->manager = $manager; |
|
43 | + parent::__construct(); |
|
44 | + } |
|
45 | 45 | |
46 | - protected function configure() { |
|
47 | - $this |
|
48 | - ->setName('workflows:list') |
|
49 | - ->setDescription('Lists configured workflows') |
|
50 | - ->addArgument( |
|
51 | - 'scope', |
|
52 | - InputArgument::OPTIONAL, |
|
53 | - 'Lists workflows for "admin", "user"', |
|
54 | - 'admin' |
|
55 | - ) |
|
56 | - ->addArgument( |
|
57 | - 'scopeId', |
|
58 | - InputArgument::OPTIONAL, |
|
59 | - 'User IDs when the scope is "user"', |
|
60 | - null |
|
61 | - ); |
|
62 | - } |
|
46 | + protected function configure() { |
|
47 | + $this |
|
48 | + ->setName('workflows:list') |
|
49 | + ->setDescription('Lists configured workflows') |
|
50 | + ->addArgument( |
|
51 | + 'scope', |
|
52 | + InputArgument::OPTIONAL, |
|
53 | + 'Lists workflows for "admin", "user"', |
|
54 | + 'admin' |
|
55 | + ) |
|
56 | + ->addArgument( |
|
57 | + 'scopeId', |
|
58 | + InputArgument::OPTIONAL, |
|
59 | + 'User IDs when the scope is "user"', |
|
60 | + null |
|
61 | + ); |
|
62 | + } |
|
63 | 63 | |
64 | - protected function mappedScope(string $scope): int { |
|
65 | - static $scopes = [ |
|
66 | - 'admin' => IManager::SCOPE_ADMIN, |
|
67 | - 'user' => IManager::SCOPE_USER, |
|
68 | - ]; |
|
69 | - return $scopes[$scope] ?? -1; |
|
70 | - } |
|
64 | + protected function mappedScope(string $scope): int { |
|
65 | + static $scopes = [ |
|
66 | + 'admin' => IManager::SCOPE_ADMIN, |
|
67 | + 'user' => IManager::SCOPE_USER, |
|
68 | + ]; |
|
69 | + return $scopes[$scope] ?? -1; |
|
70 | + } |
|
71 | 71 | |
72 | - protected function execute(InputInterface $input, OutputInterface $output): int { |
|
73 | - $ops = $this->manager->getAllOperations( |
|
74 | - new ScopeContext( |
|
75 | - $this->mappedScope($input->getArgument('scope')), |
|
76 | - $input->getArgument('scopeId') |
|
77 | - ) |
|
78 | - ); |
|
79 | - $output->writeln(\json_encode($ops)); |
|
80 | - return 0; |
|
81 | - } |
|
72 | + protected function execute(InputInterface $input, OutputInterface $output): int { |
|
73 | + $ops = $this->manager->getAllOperations( |
|
74 | + new ScopeContext( |
|
75 | + $this->mappedScope($input->getArgument('scope')), |
|
76 | + $input->getArgument('scopeId') |
|
77 | + ) |
|
78 | + ); |
|
79 | + $output->writeln(\json_encode($ops)); |
|
80 | + return 0; |
|
81 | + } |
|
82 | 82 | } |
@@ -35,72 +35,72 @@ |
||
35 | 35 | use OCP\Migration\SimpleMigrationStep; |
36 | 36 | |
37 | 37 | class Version16000Date20190212081545 extends SimpleMigrationStep { |
38 | - /** |
|
39 | - * @param IOutput $output |
|
40 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
41 | - * @param array $options |
|
42 | - * |
|
43 | - * @return ISchemaWrapper |
|
44 | - */ |
|
45 | - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ISchemaWrapper { |
|
46 | - /** @var ISchemaWrapper $schema */ |
|
47 | - $schema = $schemaClosure(); |
|
38 | + /** |
|
39 | + * @param IOutput $output |
|
40 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
41 | + * @param array $options |
|
42 | + * |
|
43 | + * @return ISchemaWrapper |
|
44 | + */ |
|
45 | + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ISchemaWrapper { |
|
46 | + /** @var ISchemaWrapper $schema */ |
|
47 | + $schema = $schemaClosure(); |
|
48 | 48 | |
49 | - $table = $schema->createTable('login_flow_v2'); |
|
50 | - $table->addColumn('id', Types::BIGINT, [ |
|
51 | - 'autoincrement' => true, |
|
52 | - 'notnull' => true, |
|
53 | - 'length' => 20, |
|
54 | - 'unsigned' => true, |
|
55 | - ]); |
|
56 | - $table->addColumn('timestamp', Types::BIGINT, [ |
|
57 | - 'notnull' => true, |
|
58 | - 'length' => 20, |
|
59 | - 'unsigned' => true, |
|
60 | - ]); |
|
61 | - $table->addColumn('started', Types::SMALLINT, [ |
|
62 | - 'notnull' => true, |
|
63 | - 'length' => 1, |
|
64 | - 'unsigned' => true, |
|
65 | - 'default' => 0, |
|
66 | - ]); |
|
67 | - $table->addColumn('poll_token', Types::STRING, [ |
|
68 | - 'notnull' => true, |
|
69 | - 'length' => 255, |
|
70 | - ]); |
|
71 | - $table->addColumn('login_token', Types::STRING, [ |
|
72 | - 'notnull' => true, |
|
73 | - 'length' => 255, |
|
74 | - ]); |
|
75 | - $table->addColumn('public_key', Types::TEXT, [ |
|
76 | - 'notnull' => true, |
|
77 | - 'length' => 32768, |
|
78 | - ]); |
|
79 | - $table->addColumn('private_key', Types::TEXT, [ |
|
80 | - 'notnull' => true, |
|
81 | - 'length' => 32768, |
|
82 | - ]); |
|
83 | - $table->addColumn('client_name', Types::STRING, [ |
|
84 | - 'notnull' => true, |
|
85 | - 'length' => 255, |
|
86 | - ]); |
|
87 | - $table->addColumn('login_name', Types::STRING, [ |
|
88 | - 'notnull' => false, |
|
89 | - 'length' => 255, |
|
90 | - ]); |
|
91 | - $table->addColumn('server', Types::STRING, [ |
|
92 | - 'notnull' => false, |
|
93 | - 'length' => 255, |
|
94 | - ]); |
|
95 | - $table->addColumn('app_password', Types::STRING, [ |
|
96 | - 'notnull' => false, |
|
97 | - 'length' => 1024, |
|
98 | - ]); |
|
99 | - $table->setPrimaryKey(['id']); |
|
100 | - $table->addUniqueIndex(['poll_token'], 'poll_token'); |
|
101 | - $table->addUniqueIndex(['login_token'], 'login_token'); |
|
102 | - $table->addIndex(['timestamp'], 'timestamp'); |
|
49 | + $table = $schema->createTable('login_flow_v2'); |
|
50 | + $table->addColumn('id', Types::BIGINT, [ |
|
51 | + 'autoincrement' => true, |
|
52 | + 'notnull' => true, |
|
53 | + 'length' => 20, |
|
54 | + 'unsigned' => true, |
|
55 | + ]); |
|
56 | + $table->addColumn('timestamp', Types::BIGINT, [ |
|
57 | + 'notnull' => true, |
|
58 | + 'length' => 20, |
|
59 | + 'unsigned' => true, |
|
60 | + ]); |
|
61 | + $table->addColumn('started', Types::SMALLINT, [ |
|
62 | + 'notnull' => true, |
|
63 | + 'length' => 1, |
|
64 | + 'unsigned' => true, |
|
65 | + 'default' => 0, |
|
66 | + ]); |
|
67 | + $table->addColumn('poll_token', Types::STRING, [ |
|
68 | + 'notnull' => true, |
|
69 | + 'length' => 255, |
|
70 | + ]); |
|
71 | + $table->addColumn('login_token', Types::STRING, [ |
|
72 | + 'notnull' => true, |
|
73 | + 'length' => 255, |
|
74 | + ]); |
|
75 | + $table->addColumn('public_key', Types::TEXT, [ |
|
76 | + 'notnull' => true, |
|
77 | + 'length' => 32768, |
|
78 | + ]); |
|
79 | + $table->addColumn('private_key', Types::TEXT, [ |
|
80 | + 'notnull' => true, |
|
81 | + 'length' => 32768, |
|
82 | + ]); |
|
83 | + $table->addColumn('client_name', Types::STRING, [ |
|
84 | + 'notnull' => true, |
|
85 | + 'length' => 255, |
|
86 | + ]); |
|
87 | + $table->addColumn('login_name', Types::STRING, [ |
|
88 | + 'notnull' => false, |
|
89 | + 'length' => 255, |
|
90 | + ]); |
|
91 | + $table->addColumn('server', Types::STRING, [ |
|
92 | + 'notnull' => false, |
|
93 | + 'length' => 255, |
|
94 | + ]); |
|
95 | + $table->addColumn('app_password', Types::STRING, [ |
|
96 | + 'notnull' => false, |
|
97 | + 'length' => 1024, |
|
98 | + ]); |
|
99 | + $table->setPrimaryKey(['id']); |
|
100 | + $table->addUniqueIndex(['poll_token'], 'poll_token'); |
|
101 | + $table->addUniqueIndex(['login_token'], 'login_token'); |
|
102 | + $table->addIndex(['timestamp'], 'timestamp'); |
|
103 | 103 | |
104 | - return $schema; |
|
105 | - } |
|
104 | + return $schema; |
|
105 | + } |
|
106 | 106 | } |
@@ -30,65 +30,65 @@ |
||
30 | 30 | use OCP\Migration\SimpleMigrationStep; |
31 | 31 | |
32 | 32 | class Version13000Date20170705121758 extends SimpleMigrationStep { |
33 | - /** |
|
34 | - * @param IOutput $output |
|
35 | - * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
36 | - * @param array $options |
|
37 | - * @return null|ISchemaWrapper |
|
38 | - * @since 13.0.0 |
|
39 | - */ |
|
40 | - public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
41 | - /** @var ISchemaWrapper $schema */ |
|
42 | - $schema = $schemaClosure(); |
|
33 | + /** |
|
34 | + * @param IOutput $output |
|
35 | + * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
36 | + * @param array $options |
|
37 | + * @return null|ISchemaWrapper |
|
38 | + * @since 13.0.0 |
|
39 | + */ |
|
40 | + public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
41 | + /** @var ISchemaWrapper $schema */ |
|
42 | + $schema = $schemaClosure(); |
|
43 | 43 | |
44 | - if (!$schema->hasTable('personal_sections')) { |
|
45 | - $table = $schema->createTable('personal_sections'); |
|
44 | + if (!$schema->hasTable('personal_sections')) { |
|
45 | + $table = $schema->createTable('personal_sections'); |
|
46 | 46 | |
47 | - $table->addColumn('id', Types::STRING, [ |
|
48 | - 'notnull' => false, |
|
49 | - 'length' => 64, |
|
50 | - ]); |
|
51 | - $table->addColumn('class', Types::STRING, [ |
|
52 | - 'notnull' => true, |
|
53 | - 'length' => 255, |
|
54 | - ]); |
|
55 | - $table->addColumn('priority', Types::INTEGER, [ |
|
56 | - 'notnull' => true, |
|
57 | - 'length' => 6, |
|
58 | - 'default' => 0, |
|
59 | - ]); |
|
47 | + $table->addColumn('id', Types::STRING, [ |
|
48 | + 'notnull' => false, |
|
49 | + 'length' => 64, |
|
50 | + ]); |
|
51 | + $table->addColumn('class', Types::STRING, [ |
|
52 | + 'notnull' => true, |
|
53 | + 'length' => 255, |
|
54 | + ]); |
|
55 | + $table->addColumn('priority', Types::INTEGER, [ |
|
56 | + 'notnull' => true, |
|
57 | + 'length' => 6, |
|
58 | + 'default' => 0, |
|
59 | + ]); |
|
60 | 60 | |
61 | - $table->setPrimaryKey(['id'], 'personal_sections_id_index'); |
|
62 | - $table->addUniqueIndex(['class'], 'personal_sections_class'); |
|
63 | - } |
|
61 | + $table->setPrimaryKey(['id'], 'personal_sections_id_index'); |
|
62 | + $table->addUniqueIndex(['class'], 'personal_sections_class'); |
|
63 | + } |
|
64 | 64 | |
65 | - if (!$schema->hasTable('personal_settings')) { |
|
66 | - $table = $schema->createTable('personal_settings'); |
|
65 | + if (!$schema->hasTable('personal_settings')) { |
|
66 | + $table = $schema->createTable('personal_settings'); |
|
67 | 67 | |
68 | - $table->addColumn('id', Types::INTEGER, [ |
|
69 | - 'autoincrement' => true, |
|
70 | - 'notnull' => true, |
|
71 | - 'length' => 20, |
|
72 | - ]); |
|
73 | - $table->addColumn('class', Types::STRING, [ |
|
74 | - 'notnull' => true, |
|
75 | - 'length' => 255, |
|
76 | - ]); |
|
77 | - $table->addColumn('section', Types::STRING, [ |
|
78 | - 'notnull' => false, |
|
79 | - 'length' => 64, |
|
80 | - ]); |
|
81 | - $table->addColumn('priority', Types::INTEGER, [ |
|
82 | - 'notnull' => true, |
|
83 | - 'length' => 6, |
|
84 | - 'default' => 0, |
|
85 | - ]); |
|
68 | + $table->addColumn('id', Types::INTEGER, [ |
|
69 | + 'autoincrement' => true, |
|
70 | + 'notnull' => true, |
|
71 | + 'length' => 20, |
|
72 | + ]); |
|
73 | + $table->addColumn('class', Types::STRING, [ |
|
74 | + 'notnull' => true, |
|
75 | + 'length' => 255, |
|
76 | + ]); |
|
77 | + $table->addColumn('section', Types::STRING, [ |
|
78 | + 'notnull' => false, |
|
79 | + 'length' => 64, |
|
80 | + ]); |
|
81 | + $table->addColumn('priority', Types::INTEGER, [ |
|
82 | + 'notnull' => true, |
|
83 | + 'length' => 6, |
|
84 | + 'default' => 0, |
|
85 | + ]); |
|
86 | 86 | |
87 | - $table->setPrimaryKey(['id'], 'personal_settings_id_index'); |
|
88 | - $table->addUniqueIndex(['class'], 'personal_settings_class'); |
|
89 | - $table->addIndex(['section'], 'personal_settings_section'); |
|
90 | - } |
|
87 | + $table->setPrimaryKey(['id'], 'personal_settings_id_index'); |
|
88 | + $table->addUniqueIndex(['class'], 'personal_settings_class'); |
|
89 | + $table->addIndex(['section'], 'personal_settings_section'); |
|
90 | + } |
|
91 | 91 | |
92 | - return $schema; |
|
93 | - } |
|
92 | + return $schema; |
|
93 | + } |
|
94 | 94 | } |
@@ -30,43 +30,43 @@ |
||
30 | 30 | use OCP\Migration\SimpleMigrationStep; |
31 | 31 | |
32 | 32 | class Version1002Date20170607104347 extends SimpleMigrationStep { |
33 | - /** |
|
34 | - * @param IOutput $output |
|
35 | - * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
36 | - * @param array $options |
|
37 | - * @return null|ISchemaWrapper |
|
38 | - * @since 13.0.0 |
|
39 | - */ |
|
40 | - public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
41 | - /** @var ISchemaWrapper $schema */ |
|
42 | - $schema = $schemaClosure(); |
|
33 | + /** |
|
34 | + * @param IOutput $output |
|
35 | + * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
36 | + * @param array $options |
|
37 | + * @return null|ISchemaWrapper |
|
38 | + * @since 13.0.0 |
|
39 | + */ |
|
40 | + public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
41 | + /** @var ISchemaWrapper $schema */ |
|
42 | + $schema = $schemaClosure(); |
|
43 | 43 | |
44 | - if (!$schema->hasTable('twofactor_backupcodes')) { |
|
45 | - $table = $schema->createTable('twofactor_backupcodes'); |
|
44 | + if (!$schema->hasTable('twofactor_backupcodes')) { |
|
45 | + $table = $schema->createTable('twofactor_backupcodes'); |
|
46 | 46 | |
47 | - $table->addColumn('id', Types::INTEGER, [ |
|
48 | - 'autoincrement' => true, |
|
49 | - 'notnull' => true, |
|
50 | - 'length' => 20, |
|
51 | - ]); |
|
52 | - $table->addColumn('user_id', Types::STRING, [ |
|
53 | - 'notnull' => true, |
|
54 | - 'length' => 64, |
|
55 | - ]); |
|
56 | - $table->addColumn('code', Types::STRING, [ |
|
57 | - 'notnull' => true, |
|
58 | - 'length' => 64, |
|
59 | - ]); |
|
60 | - $table->addColumn('used', Types::INTEGER, [ |
|
61 | - 'notnull' => true, |
|
62 | - 'length' => 1, |
|
63 | - 'default' => 0, |
|
64 | - ]); |
|
47 | + $table->addColumn('id', Types::INTEGER, [ |
|
48 | + 'autoincrement' => true, |
|
49 | + 'notnull' => true, |
|
50 | + 'length' => 20, |
|
51 | + ]); |
|
52 | + $table->addColumn('user_id', Types::STRING, [ |
|
53 | + 'notnull' => true, |
|
54 | + 'length' => 64, |
|
55 | + ]); |
|
56 | + $table->addColumn('code', Types::STRING, [ |
|
57 | + 'notnull' => true, |
|
58 | + 'length' => 64, |
|
59 | + ]); |
|
60 | + $table->addColumn('used', Types::INTEGER, [ |
|
61 | + 'notnull' => true, |
|
62 | + 'length' => 1, |
|
63 | + 'default' => 0, |
|
64 | + ]); |
|
65 | 65 | |
66 | - $table->setPrimaryKey(['id']); |
|
67 | - $table->addIndex(['user_id'], 'twofactor_backupcodes_uid'); |
|
68 | - } |
|
66 | + $table->setPrimaryKey(['id']); |
|
67 | + $table->addIndex(['user_id'], 'twofactor_backupcodes_uid'); |
|
68 | + } |
|
69 | 69 | |
70 | - return $schema; |
|
71 | - } |
|
70 | + return $schema; |
|
71 | + } |
|
72 | 72 | } |
@@ -35,45 +35,45 @@ |
||
35 | 35 | |
36 | 36 | class Version1008Date20181105110300 extends SimpleMigrationStep { |
37 | 37 | |
38 | - /** @var IDBConnection */ |
|
39 | - private $connection; |
|
38 | + /** @var IDBConnection */ |
|
39 | + private $connection; |
|
40 | 40 | |
41 | - /** |
|
42 | - * Version1008Date20181105110300 constructor. |
|
43 | - * |
|
44 | - * @param IDBConnection $connection |
|
45 | - */ |
|
46 | - public function __construct(IDBConnection $connection) { |
|
47 | - $this->connection = $connection; |
|
48 | - } |
|
41 | + /** |
|
42 | + * Version1008Date20181105110300 constructor. |
|
43 | + * |
|
44 | + * @param IDBConnection $connection |
|
45 | + */ |
|
46 | + public function __construct(IDBConnection $connection) { |
|
47 | + $this->connection = $connection; |
|
48 | + } |
|
49 | 49 | |
50 | - /** |
|
51 | - * @param IOutput $output |
|
52 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
53 | - * @param array $options |
|
54 | - * @return null|ISchemaWrapper |
|
55 | - */ |
|
56 | - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
57 | - /** @var ISchemaWrapper $schema */ |
|
58 | - $schema = $schemaClosure(); |
|
59 | - $table = $schema->getTable('calendarsubscriptions'); |
|
60 | - $table->addColumn('source', Types::TEXT, [ |
|
61 | - 'notnull' => false, |
|
62 | - 'length' => null, |
|
63 | - ]); |
|
50 | + /** |
|
51 | + * @param IOutput $output |
|
52 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
53 | + * @param array $options |
|
54 | + * @return null|ISchemaWrapper |
|
55 | + */ |
|
56 | + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
57 | + /** @var ISchemaWrapper $schema */ |
|
58 | + $schema = $schemaClosure(); |
|
59 | + $table = $schema->getTable('calendarsubscriptions'); |
|
60 | + $table->addColumn('source', Types::TEXT, [ |
|
61 | + 'notnull' => false, |
|
62 | + 'length' => null, |
|
63 | + ]); |
|
64 | 64 | |
65 | - return $schema; |
|
66 | - } |
|
65 | + return $schema; |
|
66 | + } |
|
67 | 67 | |
68 | - /** |
|
69 | - * @param IOutput $output |
|
70 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
71 | - * @param array $options |
|
72 | - */ |
|
73 | - public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { |
|
74 | - $qb = $this->connection->getQueryBuilder(); |
|
75 | - $qb->update('calendarsubscriptions') |
|
76 | - ->set('source', 'source_copy') |
|
77 | - ->execute(); |
|
78 | - } |
|
68 | + /** |
|
69 | + * @param IOutput $output |
|
70 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
71 | + * @param array $options |
|
72 | + */ |
|
73 | + public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { |
|
74 | + $qb = $this->connection->getQueryBuilder(); |
|
75 | + $qb->update('calendarsubscriptions') |
|
76 | + ->set('source', 'source_copy') |
|
77 | + ->execute(); |
|
78 | + } |
|
79 | 79 | } |
@@ -33,50 +33,50 @@ |
||
33 | 33 | |
34 | 34 | class Version1005Date20180413093149 extends SimpleMigrationStep { |
35 | 35 | |
36 | - /** |
|
37 | - * @param IOutput $output |
|
38 | - * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
39 | - * @param array $options |
|
40 | - * @return null|ISchemaWrapper |
|
41 | - */ |
|
42 | - public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
36 | + /** |
|
37 | + * @param IOutput $output |
|
38 | + * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
39 | + * @param array $options |
|
40 | + * @return null|ISchemaWrapper |
|
41 | + */ |
|
42 | + public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
43 | 43 | |
44 | - /** @var ISchemaWrapper $schema */ |
|
45 | - $schema = $schemaClosure(); |
|
44 | + /** @var ISchemaWrapper $schema */ |
|
45 | + $schema = $schemaClosure(); |
|
46 | 46 | |
47 | - if (!$schema->hasTable('directlink')) { |
|
48 | - $table = $schema->createTable('directlink'); |
|
47 | + if (!$schema->hasTable('directlink')) { |
|
48 | + $table = $schema->createTable('directlink'); |
|
49 | 49 | |
50 | - $table->addColumn('id',Types::BIGINT, [ |
|
51 | - 'autoincrement' => true, |
|
52 | - 'notnull' => true, |
|
53 | - 'length' => 11, |
|
54 | - 'unsigned' => true, |
|
55 | - ]); |
|
56 | - $table->addColumn('user_id', Types::STRING, [ |
|
57 | - 'notnull' => false, |
|
58 | - 'length' => 64, |
|
59 | - ]); |
|
60 | - $table->addColumn('file_id', Types::BIGINT, [ |
|
61 | - 'notnull' => true, |
|
62 | - 'length' => 11, |
|
63 | - 'unsigned' => true, |
|
64 | - ]); |
|
65 | - $table->addColumn('token', Types::STRING, [ |
|
66 | - 'notnull' => false, |
|
67 | - 'length' => 60, |
|
68 | - ]); |
|
69 | - $table->addColumn('expiration', Types::BIGINT, [ |
|
70 | - 'notnull' => true, |
|
71 | - 'length' => 11, |
|
72 | - 'unsigned' => true, |
|
73 | - ]); |
|
50 | + $table->addColumn('id',Types::BIGINT, [ |
|
51 | + 'autoincrement' => true, |
|
52 | + 'notnull' => true, |
|
53 | + 'length' => 11, |
|
54 | + 'unsigned' => true, |
|
55 | + ]); |
|
56 | + $table->addColumn('user_id', Types::STRING, [ |
|
57 | + 'notnull' => false, |
|
58 | + 'length' => 64, |
|
59 | + ]); |
|
60 | + $table->addColumn('file_id', Types::BIGINT, [ |
|
61 | + 'notnull' => true, |
|
62 | + 'length' => 11, |
|
63 | + 'unsigned' => true, |
|
64 | + ]); |
|
65 | + $table->addColumn('token', Types::STRING, [ |
|
66 | + 'notnull' => false, |
|
67 | + 'length' => 60, |
|
68 | + ]); |
|
69 | + $table->addColumn('expiration', Types::BIGINT, [ |
|
70 | + 'notnull' => true, |
|
71 | + 'length' => 11, |
|
72 | + 'unsigned' => true, |
|
73 | + ]); |
|
74 | 74 | |
75 | - $table->setPrimaryKey(['id'], 'directlink_id_idx'); |
|
76 | - $table->addIndex(['token'], 'directlink_token_idx'); |
|
77 | - $table->addIndex(['expiration'], 'directlink_expiration_idx'); |
|
75 | + $table->setPrimaryKey(['id'], 'directlink_id_idx'); |
|
76 | + $table->addIndex(['token'], 'directlink_token_idx'); |
|
77 | + $table->addIndex(['expiration'], 'directlink_expiration_idx'); |
|
78 | 78 | |
79 | - return $schema; |
|
80 | - } |
|
81 | - } |
|
79 | + return $schema; |
|
80 | + } |
|
81 | + } |
|
82 | 82 | } |
@@ -35,61 +35,61 @@ |
||
35 | 35 | */ |
36 | 36 | class Version1006Date20180619154313 extends SimpleMigrationStep { |
37 | 37 | |
38 | - /** |
|
39 | - * @param IOutput $output |
|
40 | - * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
41 | - * @param array $options |
|
42 | - * @return null|ISchemaWrapper |
|
43 | - * @since 13.0.0 |
|
44 | - */ |
|
45 | - public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
46 | - /** @var ISchemaWrapper $schema */ |
|
47 | - $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 | + * @since 13.0.0 |
|
44 | + */ |
|
45 | + public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
46 | + /** @var ISchemaWrapper $schema */ |
|
47 | + $schema = $schemaClosure(); |
|
48 | 48 | |
49 | - if (!$schema->hasTable('calendar_invitations')) { |
|
50 | - $table = $schema->createTable('calendar_invitations'); |
|
49 | + if (!$schema->hasTable('calendar_invitations')) { |
|
50 | + $table = $schema->createTable('calendar_invitations'); |
|
51 | 51 | |
52 | - $table->addColumn('id', Types::BIGINT, [ |
|
53 | - 'autoincrement' => true, |
|
54 | - 'notnull' => true, |
|
55 | - 'length' => 11, |
|
56 | - 'unsigned' => true, |
|
57 | - ]); |
|
58 | - $table->addColumn('uid', Types::STRING, [ |
|
59 | - 'notnull' => true, |
|
60 | - 'length' => 255, |
|
61 | - ]); |
|
62 | - $table->addColumn('recurrenceid', Types::STRING, [ |
|
63 | - 'notnull' => false, |
|
64 | - 'length' => 255, |
|
65 | - ]); |
|
66 | - $table->addColumn('attendee', Types::STRING, [ |
|
67 | - 'notnull' => true, |
|
68 | - 'length' => 255, |
|
69 | - ]); |
|
70 | - $table->addColumn('organizer', Types::STRING, [ |
|
71 | - 'notnull' => true, |
|
72 | - 'length' => 255, |
|
73 | - ]); |
|
74 | - $table->addColumn('sequence', Types::BIGINT, [ |
|
75 | - 'notnull' => false, |
|
76 | - 'length' => 11, |
|
77 | - 'unsigned' => true, |
|
78 | - ]); |
|
79 | - $table->addColumn('token', Types::STRING, [ |
|
80 | - 'notnull' => true, |
|
81 | - 'length' => 60, |
|
82 | - ]); |
|
83 | - $table->addColumn('expiration', Types::BIGINT, [ |
|
84 | - 'notnull' => true, |
|
85 | - 'length' => 11, |
|
86 | - 'unsigned' => true, |
|
87 | - ]); |
|
52 | + $table->addColumn('id', Types::BIGINT, [ |
|
53 | + 'autoincrement' => true, |
|
54 | + 'notnull' => true, |
|
55 | + 'length' => 11, |
|
56 | + 'unsigned' => true, |
|
57 | + ]); |
|
58 | + $table->addColumn('uid', Types::STRING, [ |
|
59 | + 'notnull' => true, |
|
60 | + 'length' => 255, |
|
61 | + ]); |
|
62 | + $table->addColumn('recurrenceid', Types::STRING, [ |
|
63 | + 'notnull' => false, |
|
64 | + 'length' => 255, |
|
65 | + ]); |
|
66 | + $table->addColumn('attendee', Types::STRING, [ |
|
67 | + 'notnull' => true, |
|
68 | + 'length' => 255, |
|
69 | + ]); |
|
70 | + $table->addColumn('organizer', Types::STRING, [ |
|
71 | + 'notnull' => true, |
|
72 | + 'length' => 255, |
|
73 | + ]); |
|
74 | + $table->addColumn('sequence', Types::BIGINT, [ |
|
75 | + 'notnull' => false, |
|
76 | + 'length' => 11, |
|
77 | + 'unsigned' => true, |
|
78 | + ]); |
|
79 | + $table->addColumn('token', Types::STRING, [ |
|
80 | + 'notnull' => true, |
|
81 | + 'length' => 60, |
|
82 | + ]); |
|
83 | + $table->addColumn('expiration', Types::BIGINT, [ |
|
84 | + 'notnull' => true, |
|
85 | + 'length' => 11, |
|
86 | + 'unsigned' => true, |
|
87 | + ]); |
|
88 | 88 | |
89 | - $table->setPrimaryKey(['id']); |
|
90 | - $table->addIndex(['token'], 'calendar_invitation_tokens'); |
|
89 | + $table->setPrimaryKey(['id']); |
|
90 | + $table->addIndex(['token'], 'calendar_invitation_tokens'); |
|
91 | 91 | |
92 | - return $schema; |
|
93 | - } |
|
94 | - } |
|
92 | + return $schema; |
|
93 | + } |
|
94 | + } |
|
95 | 95 | } |
@@ -35,46 +35,46 @@ |
||
35 | 35 | |
36 | 36 | class Version1008Date20181105104826 extends SimpleMigrationStep { |
37 | 37 | |
38 | - /** @var IDBConnection */ |
|
39 | - private $connection; |
|
38 | + /** @var IDBConnection */ |
|
39 | + private $connection; |
|
40 | 40 | |
41 | - /** |
|
42 | - * Version1008Date20181105104826 constructor. |
|
43 | - * |
|
44 | - * @param IDBConnection $connection |
|
45 | - */ |
|
46 | - public function __construct(IDBConnection $connection) { |
|
47 | - $this->connection = $connection; |
|
48 | - } |
|
41 | + /** |
|
42 | + * Version1008Date20181105104826 constructor. |
|
43 | + * |
|
44 | + * @param IDBConnection $connection |
|
45 | + */ |
|
46 | + public function __construct(IDBConnection $connection) { |
|
47 | + $this->connection = $connection; |
|
48 | + } |
|
49 | 49 | |
50 | - /** |
|
51 | - * @param IOutput $output |
|
52 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
53 | - * @param array $options |
|
54 | - * @return null|ISchemaWrapper |
|
55 | - */ |
|
56 | - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
57 | - /** @var ISchemaWrapper $schema */ |
|
58 | - $schema = $schemaClosure(); |
|
59 | - $table = $schema->getTable('calendarsubscriptions'); |
|
50 | + /** |
|
51 | + * @param IOutput $output |
|
52 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
53 | + * @param array $options |
|
54 | + * @return null|ISchemaWrapper |
|
55 | + */ |
|
56 | + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
57 | + /** @var ISchemaWrapper $schema */ |
|
58 | + $schema = $schemaClosure(); |
|
59 | + $table = $schema->getTable('calendarsubscriptions'); |
|
60 | 60 | |
61 | - $table->addColumn('source_copy', Types::TEXT, [ |
|
62 | - 'notnull' => false, |
|
63 | - 'length' => null, |
|
64 | - ]); |
|
61 | + $table->addColumn('source_copy', Types::TEXT, [ |
|
62 | + 'notnull' => false, |
|
63 | + 'length' => null, |
|
64 | + ]); |
|
65 | 65 | |
66 | - return $schema; |
|
67 | - } |
|
66 | + return $schema; |
|
67 | + } |
|
68 | 68 | |
69 | - /** |
|
70 | - * @param IOutput $output |
|
71 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
72 | - * @param array $options |
|
73 | - */ |
|
74 | - public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { |
|
75 | - $qb = $this->connection->getQueryBuilder(); |
|
76 | - $qb->update('calendarsubscriptions') |
|
77 | - ->set('source_copy', 'source') |
|
78 | - ->execute(); |
|
79 | - } |
|
69 | + /** |
|
70 | + * @param IOutput $output |
|
71 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
72 | + * @param array $options |
|
73 | + */ |
|
74 | + public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { |
|
75 | + $qb = $this->connection->getQueryBuilder(); |
|
76 | + $qb->update('calendarsubscriptions') |
|
77 | + ->set('source_copy', 'source') |
|
78 | + ->execute(); |
|
79 | + } |
|
80 | 80 | } |
@@ -33,56 +33,56 @@ |
||
33 | 33 | |
34 | 34 | class Version1005Date20180530124431 extends SimpleMigrationStep { |
35 | 35 | |
36 | - /** |
|
37 | - * @param IOutput $output |
|
38 | - * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
39 | - * @param array $options |
|
40 | - * @return null|ISchemaWrapper |
|
41 | - * @since 13.0.0 |
|
42 | - */ |
|
43 | - public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
44 | - /** @var ISchemaWrapper $schema */ |
|
45 | - $schema = $schemaClosure(); |
|
36 | + /** |
|
37 | + * @param IOutput $output |
|
38 | + * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
39 | + * @param array $options |
|
40 | + * @return null|ISchemaWrapper |
|
41 | + * @since 13.0.0 |
|
42 | + */ |
|
43 | + public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
44 | + /** @var ISchemaWrapper $schema */ |
|
45 | + $schema = $schemaClosure(); |
|
46 | 46 | |
47 | - $types = ['resources', 'rooms']; |
|
48 | - foreach ($types as $type) { |
|
49 | - if (!$schema->hasTable('calendar_' . $type)) { |
|
50 | - $table = $schema->createTable('calendar_' . $type); |
|
47 | + $types = ['resources', 'rooms']; |
|
48 | + foreach ($types as $type) { |
|
49 | + if (!$schema->hasTable('calendar_' . $type)) { |
|
50 | + $table = $schema->createTable('calendar_' . $type); |
|
51 | 51 | |
52 | - $table->addColumn('id', Types::BIGINT, [ |
|
53 | - 'autoincrement' => true, |
|
54 | - 'notnull' => true, |
|
55 | - 'length' => 11, |
|
56 | - 'unsigned' => true, |
|
57 | - ]); |
|
58 | - $table->addColumn('backend_id', Types::STRING, [ |
|
59 | - 'notnull' => false, |
|
60 | - 'length' => 64, |
|
61 | - ]); |
|
62 | - $table->addColumn('resource_id', Types::STRING, [ |
|
63 | - 'notnull' => false, |
|
64 | - 'length' => 64, |
|
65 | - ]); |
|
66 | - $table->addColumn('email', Types::STRING, [ |
|
67 | - 'notnull' => false, |
|
68 | - 'length' => 255, |
|
69 | - ]); |
|
70 | - $table->addColumn('displayname', Types::STRING, [ |
|
71 | - 'notnull' => false, |
|
72 | - 'length' => 255, |
|
73 | - ]); |
|
74 | - $table->addColumn('group_restrictions', Types::STRING, [ |
|
75 | - 'notnull' => false, |
|
76 | - 'length' => 4000, |
|
77 | - ]); |
|
52 | + $table->addColumn('id', Types::BIGINT, [ |
|
53 | + 'autoincrement' => true, |
|
54 | + 'notnull' => true, |
|
55 | + 'length' => 11, |
|
56 | + 'unsigned' => true, |
|
57 | + ]); |
|
58 | + $table->addColumn('backend_id', Types::STRING, [ |
|
59 | + 'notnull' => false, |
|
60 | + 'length' => 64, |
|
61 | + ]); |
|
62 | + $table->addColumn('resource_id', Types::STRING, [ |
|
63 | + 'notnull' => false, |
|
64 | + 'length' => 64, |
|
65 | + ]); |
|
66 | + $table->addColumn('email', Types::STRING, [ |
|
67 | + 'notnull' => false, |
|
68 | + 'length' => 255, |
|
69 | + ]); |
|
70 | + $table->addColumn('displayname', Types::STRING, [ |
|
71 | + 'notnull' => false, |
|
72 | + 'length' => 255, |
|
73 | + ]); |
|
74 | + $table->addColumn('group_restrictions', Types::STRING, [ |
|
75 | + 'notnull' => false, |
|
76 | + 'length' => 4000, |
|
77 | + ]); |
|
78 | 78 | |
79 | - $table->setPrimaryKey(['id']); |
|
80 | - $table->addIndex(['backend_id', 'resource_id'], 'calendar_' . $type . '_bkdrsc'); |
|
81 | - $table->addIndex(['email'], 'calendar_' . $type . '_email'); |
|
82 | - $table->addIndex(['displayname'], 'calendar_' . $type . '_name'); |
|
83 | - } |
|
84 | - } |
|
79 | + $table->setPrimaryKey(['id']); |
|
80 | + $table->addIndex(['backend_id', 'resource_id'], 'calendar_' . $type . '_bkdrsc'); |
|
81 | + $table->addIndex(['email'], 'calendar_' . $type . '_email'); |
|
82 | + $table->addIndex(['displayname'], 'calendar_' . $type . '_name'); |
|
83 | + } |
|
84 | + } |
|
85 | 85 | |
86 | - return $schema; |
|
87 | - } |
|
86 | + return $schema; |
|
87 | + } |
|
88 | 88 | } |