diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-07-02 12:21:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-02 12:21:01 +0200 |
commit | 0157e30ad4281d65818ac0f0e08f990aa145ca95 (patch) | |
tree | a9e7959748a3bf23d0a5c18ada7fce13f32e0da4 /apps | |
parent | 0ac3a65f627fab0e5010af4c496410441e47aed4 (diff) | |
parent | 87dd760a89891d15f75175e5caa43a3983a28d38 (diff) | |
download | nextcloud-server-0157e30ad4281d65818ac0f0e08f990aa145ca95.tar.gz nextcloud-server-0157e30ad4281d65818ac0f0e08f990aa145ca95.zip |
Merge pull request #21599 from nextcloud/debt/noid/type-to-types
Replace TYPE with TYPES
Diffstat (limited to 'apps')
14 files changed, 83 insertions, 82 deletions
diff --git a/apps/dav/lib/Migration/Version1005Date20180413093149.php b/apps/dav/lib/Migration/Version1005Date20180413093149.php index 3b02726ab72..dca148fbdfa 100644 --- a/apps/dav/lib/Migration/Version1005Date20180413093149.php +++ b/apps/dav/lib/Migration/Version1005Date20180413093149.php @@ -26,7 +26,7 @@ declare(strict_types=1); namespace OCA\DAV\Migration; -use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Types\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; @@ -47,26 +47,26 @@ class Version1005Date20180413093149 extends SimpleMigrationStep { if (!$schema->hasTable('directlink')) { $table = $schema->createTable('directlink'); - $table->addColumn('id',Type::BIGINT, [ + $table->addColumn('id',Types::BIGINT, [ 'autoincrement' => true, 'notnull' => true, 'length' => 11, 'unsigned' => true, ]); - $table->addColumn('user_id', Type::STRING, [ + $table->addColumn('user_id', Types::STRING, [ 'notnull' => false, 'length' => 64, ]); - $table->addColumn('file_id', Type::BIGINT, [ + $table->addColumn('file_id', Types::BIGINT, [ 'notnull' => true, 'length' => 11, 'unsigned' => true, ]); - $table->addColumn('token', Type::STRING, [ + $table->addColumn('token', Types::STRING, [ 'notnull' => false, 'length' => 60, ]); - $table->addColumn('expiration', Type::BIGINT, [ + $table->addColumn('expiration', Types::BIGINT, [ 'notnull' => true, 'length' => 11, 'unsigned' => true, diff --git a/apps/dav/lib/Migration/Version1005Date20180530124431.php b/apps/dav/lib/Migration/Version1005Date20180530124431.php index 71f6064c5c1..a270f903f10 100644 --- a/apps/dav/lib/Migration/Version1005Date20180530124431.php +++ b/apps/dav/lib/Migration/Version1005Date20180530124431.php @@ -26,7 +26,7 @@ namespace OCA\DAV\Migration; -use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Types\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; @@ -49,29 +49,29 @@ class Version1005Date20180530124431 extends SimpleMigrationStep { if (!$schema->hasTable('calendar_' . $type)) { $table = $schema->createTable('calendar_' . $type); - $table->addColumn('id', Type::BIGINT, [ + $table->addColumn('id', Types::BIGINT, [ 'autoincrement' => true, 'notnull' => true, 'length' => 11, 'unsigned' => true, ]); - $table->addColumn('backend_id', Type::STRING, [ + $table->addColumn('backend_id', Types::STRING, [ 'notnull' => false, 'length' => 64, ]); - $table->addColumn('resource_id', Type::STRING, [ + $table->addColumn('resource_id', Types::STRING, [ 'notnull' => false, 'length' => 64, ]); - $table->addColumn('email', Type::STRING, [ + $table->addColumn('email', Types::STRING, [ 'notnull' => false, 'length' => 255, ]); - $table->addColumn('displayname', Type::STRING, [ + $table->addColumn('displayname', Types::STRING, [ 'notnull' => false, 'length' => 255, ]); - $table->addColumn('group_restrictions', Type::STRING, [ + $table->addColumn('group_restrictions', Types::STRING, [ 'notnull' => false, 'length' => 4000, ]); diff --git a/apps/dav/lib/Migration/Version1006Date20180619154313.php b/apps/dav/lib/Migration/Version1006Date20180619154313.php index d3590a3ff48..883307c1132 100644 --- a/apps/dav/lib/Migration/Version1006Date20180619154313.php +++ b/apps/dav/lib/Migration/Version1006Date20180619154313.php @@ -25,7 +25,7 @@ */ namespace OCA\DAV\Migration; -use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Types\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; @@ -49,38 +49,38 @@ class Version1006Date20180619154313 extends SimpleMigrationStep { if (!$schema->hasTable('calendar_invitations')) { $table = $schema->createTable('calendar_invitations'); - $table->addColumn('id', Type::BIGINT, [ + $table->addColumn('id', Types::BIGINT, [ 'autoincrement' => true, 'notnull' => true, 'length' => 11, 'unsigned' => true, ]); - $table->addColumn('uid', Type::STRING, [ + $table->addColumn('uid', Types::STRING, [ 'notnull' => true, 'length' => 255, ]); - $table->addColumn('recurrenceid', Type::STRING, [ + $table->addColumn('recurrenceid', Types::STRING, [ 'notnull' => false, 'length' => 255, ]); - $table->addColumn('attendee', Type::STRING, [ + $table->addColumn('attendee', Types::STRING, [ 'notnull' => true, 'length' => 255, ]); - $table->addColumn('organizer', Type::STRING, [ + $table->addColumn('organizer', Types::STRING, [ 'notnull' => true, 'length' => 255, ]); - $table->addColumn('sequence', Type::BIGINT, [ + $table->addColumn('sequence', Types::BIGINT, [ 'notnull' => false, 'length' => 11, 'unsigned' => true, ]); - $table->addColumn('token', Type::STRING, [ + $table->addColumn('token', Types::STRING, [ 'notnull' => true, 'length' => 60, ]); - $table->addColumn('expiration', Type::BIGINT, [ + $table->addColumn('expiration', Types::BIGINT, [ 'notnull' => true, 'length' => 11, 'unsigned' => true, diff --git a/apps/dav/lib/Migration/Version1006Date20180628111625.php b/apps/dav/lib/Migration/Version1006Date20180628111625.php index 08a5951d8df..d83b23b27f6 100644 --- a/apps/dav/lib/Migration/Version1006Date20180628111625.php +++ b/apps/dav/lib/Migration/Version1006Date20180628111625.php @@ -28,7 +28,7 @@ declare(strict_types=1); namespace OCA\DAV\Migration; -use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Types\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; @@ -47,7 +47,7 @@ class Version1006Date20180628111625 extends SimpleMigrationStep { if ($schema->hasTable('calendarchanges')) { $calendarChangesTable = $schema->getTable('calendarchanges'); - $calendarChangesTable->addColumn('calendartype', Type::INTEGER, [ + $calendarChangesTable->addColumn('calendartype', Types::INTEGER, [ 'notnull' => true, 'default' => 0, ]); @@ -60,7 +60,7 @@ class Version1006Date20180628111625 extends SimpleMigrationStep { if ($schema->hasTable('calendarobjects')) { $calendarObjectsTable = $schema->getTable('calendarobjects'); - $calendarObjectsTable->addColumn('calendartype', Type::INTEGER, [ + $calendarObjectsTable->addColumn('calendartype', Types::INTEGER, [ 'notnull' => true, 'default' => 0, ]); @@ -73,7 +73,7 @@ class Version1006Date20180628111625 extends SimpleMigrationStep { if ($schema->hasTable('calendarobjects_props')) { $calendarObjectsPropsTable = $schema->getTable('calendarobjects_props'); - $calendarObjectsPropsTable->addColumn('calendartype', Type::INTEGER, [ + $calendarObjectsPropsTable->addColumn('calendartype', Types::INTEGER, [ 'notnull' => true, 'default' => 0, ]); diff --git a/apps/dav/lib/Migration/Version1008Date20181030113700.php b/apps/dav/lib/Migration/Version1008Date20181030113700.php index 97f1a72062b..530399cae5c 100644 --- a/apps/dav/lib/Migration/Version1008Date20181030113700.php +++ b/apps/dav/lib/Migration/Version1008Date20181030113700.php @@ -27,7 +27,7 @@ namespace OCA\DAV\Migration; use Closure; -use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Types\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; @@ -45,7 +45,7 @@ class Version1008Date20181030113700 extends SimpleMigrationStep { $schema = $schemaClosure(); $table = $schema->getTable('cards'); - $table->addColumn('uid', Type::STRING, [ + $table->addColumn('uid', Types::STRING, [ 'notnull' => false, 'length' => 255 ]); diff --git a/apps/dav/lib/Migration/Version1008Date20181105104826.php b/apps/dav/lib/Migration/Version1008Date20181105104826.php index cc80c6552c4..93a5163e6f0 100644 --- a/apps/dav/lib/Migration/Version1008Date20181105104826.php +++ b/apps/dav/lib/Migration/Version1008Date20181105104826.php @@ -27,7 +27,7 @@ declare(strict_types=1); namespace OCA\DAV\Migration; use Closure; -use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Types\Types; use OCP\DB\ISchemaWrapper; use OCP\IDBConnection; use OCP\Migration\IOutput; @@ -58,7 +58,7 @@ class Version1008Date20181105104826 extends SimpleMigrationStep { $schema = $schemaClosure(); $table = $schema->getTable('calendarsubscriptions'); - $table->addColumn('source_copy', Type::TEXT, [ + $table->addColumn('source_copy', Types::TEXT, [ 'notnull' => false, 'length' => null, ]); diff --git a/apps/dav/lib/Migration/Version1008Date20181105110300.php b/apps/dav/lib/Migration/Version1008Date20181105110300.php index e36ec34dd8d..55b14f3ccbf 100644 --- a/apps/dav/lib/Migration/Version1008Date20181105110300.php +++ b/apps/dav/lib/Migration/Version1008Date20181105110300.php @@ -27,7 +27,7 @@ declare(strict_types=1); namespace OCA\DAV\Migration; use Closure; -use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Types\Types; use OCP\DB\ISchemaWrapper; use OCP\IDBConnection; use OCP\Migration\IOutput; @@ -57,7 +57,7 @@ class Version1008Date20181105110300 extends SimpleMigrationStep { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); $table = $schema->getTable('calendarsubscriptions'); - $table->addColumn('source', Type::TEXT, [ + $table->addColumn('source', Types::TEXT, [ 'notnull' => false, 'length' => null, ]); diff --git a/apps/dav/lib/Migration/Version1011Date20190725113607.php b/apps/dav/lib/Migration/Version1011Date20190725113607.php index 4163d0d0ec6..5a25bf126dc 100644 --- a/apps/dav/lib/Migration/Version1011Date20190725113607.php +++ b/apps/dav/lib/Migration/Version1011Date20190725113607.php @@ -27,7 +27,7 @@ declare(strict_types=1); */ namespace OCA\DAV\Migration; -use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Types\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; @@ -53,22 +53,22 @@ class Version1011Date20190725113607 extends SimpleMigrationStep { if (!$schema->hasTable($this->getMetadataTableName($type))) { $table = $schema->createTable($this->getMetadataTableName($type)); - $table->addColumn('id', Type::BIGINT, [ + $table->addColumn('id', Types::BIGINT, [ 'autoincrement' => true, 'notnull' => true, 'length' => 11, 'unsigned' => true, ]); - $table->addColumn($type . '_id', Type::BIGINT, [ + $table->addColumn($type . '_id', Types::BIGINT, [ 'notnull' => true, 'length' => 11, 'unsigned' => true, ]); - $table->addColumn('key', Type::STRING, [ + $table->addColumn('key', Types::STRING, [ 'notnull' => true, 'length' => 255, ]); - $table->addColumn('value', Type::STRING, [ + $table->addColumn('value', Types::STRING, [ 'notnull' => false, 'length' => 4000, ]); diff --git a/apps/dav/lib/Migration/Version1011Date20190806104428.php b/apps/dav/lib/Migration/Version1011Date20190806104428.php index 7b7a1c58986..e257a36bb61 100644 --- a/apps/dav/lib/Migration/Version1011Date20190806104428.php +++ b/apps/dav/lib/Migration/Version1011Date20190806104428.php @@ -28,7 +28,7 @@ declare(strict_types=1); namespace OCA\DAV\Migration; use Closure; -use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Types\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; @@ -48,21 +48,21 @@ class Version1011Date20190806104428 extends SimpleMigrationStep { $schema = $schemaClosure(); $table = $schema->createTable('dav_cal_proxy'); - $table->addColumn('id', Type::BIGINT, [ + $table->addColumn('id', Types::BIGINT, [ 'autoincrement' => true, 'notnull' => true, 'length' => 11, 'unsigned' => true, ]); - $table->addColumn('owner_id', Type::STRING, [ + $table->addColumn('owner_id', Types::STRING, [ 'notnull' => true, 'length' => 64, ]); - $table->addColumn('proxy_id', Type::STRING, [ + $table->addColumn('proxy_id', Types::STRING, [ 'notnull' => true, 'length' => 64, ]); - $table->addColumn('permissions', Type::INTEGER, [ + $table->addColumn('permissions', Types::INTEGER, [ 'notnull' => false, 'length' => 4, 'unsigned' => true, diff --git a/apps/dav/lib/Migration/Version1012Date20190808122342.php b/apps/dav/lib/Migration/Version1012Date20190808122342.php index 10e891d71a1..7aa51a224ec 100644 --- a/apps/dav/lib/Migration/Version1012Date20190808122342.php +++ b/apps/dav/lib/Migration/Version1012Date20190808122342.php @@ -28,7 +28,7 @@ declare(strict_types=1); namespace OCA\DAV\Migration; -use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Types\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; @@ -54,59 +54,59 @@ class Version1012Date20190808122342 extends SimpleMigrationStep { if (!$schema->hasTable('calendar_reminders')) { $table = $schema->createTable('calendar_reminders'); - $table->addColumn('id', Type::BIGINT, [ + $table->addColumn('id', Types::BIGINT, [ 'autoincrement' => true, 'notnull' => true, 'length' => 11, 'unsigned' => true, ]); - $table->addColumn('calendar_id', Type::BIGINT, [ + $table->addColumn('calendar_id', Types::BIGINT, [ 'notnull' => true, 'length' => 11, ]); - $table->addColumn('object_id', Type::BIGINT, [ + $table->addColumn('object_id', Types::BIGINT, [ 'notnull' => true, 'length' => 11, ]); - $table->addColumn('is_recurring', Type::SMALLINT, [ + $table->addColumn('is_recurring', Types::SMALLINT, [ 'notnull' => true, 'length' => 1, ]); - $table->addColumn('uid', Type::STRING, [ + $table->addColumn('uid', Types::STRING, [ 'notnull' => true, 'length' => 255, ]); - $table->addColumn('recurrence_id', Type::BIGINT, [ + $table->addColumn('recurrence_id', Types::BIGINT, [ 'notnull' => false, 'length' => 11, 'unsigned' => true, ]); - $table->addColumn('is_recurrence_exception', Type::SMALLINT, [ + $table->addColumn('is_recurrence_exception', Types::SMALLINT, [ 'notnull' => true, 'length' => 1, ]); - $table->addColumn('event_hash', Type::STRING, [ + $table->addColumn('event_hash', Types::STRING, [ 'notnull' => true, 'length' => 255, ]); - $table->addColumn('alarm_hash', Type::STRING, [ + $table->addColumn('alarm_hash', Types::STRING, [ 'notnull' => true, 'length' => 255, ]); - $table->addColumn('type', Type::STRING, [ + $table->addColumn('type', Types::STRING, [ 'notnull' => true, 'length' => 255, ]); - $table->addColumn('is_relative', Type::SMALLINT, [ + $table->addColumn('is_relative', Types::SMALLINT, [ 'notnull' => true, 'length' => 1, ]); - $table->addColumn('notification_date', Type::BIGINT, [ + $table->addColumn('notification_date', Types::BIGINT, [ 'notnull' => true, 'length' => 11, 'unsigned' => true, ]); - $table->addColumn('is_repeat_based', Type::SMALLINT, [ + $table->addColumn('is_repeat_based', Types::SMALLINT, [ 'notnull' => true, 'length' => 1, ]); diff --git a/apps/settings/lib/Controller/CheckSetupController.php b/apps/settings/lib/Controller/CheckSetupController.php index 603a1941336..3fd4407f7c9 100644 --- a/apps/settings/lib/Controller/CheckSetupController.php +++ b/apps/settings/lib/Controller/CheckSetupController.php @@ -42,7 +42,7 @@ use bantu\IniGetWrapper\IniGetWrapper; use DirectoryIterator; use Doctrine\DBAL\DBALException; use Doctrine\DBAL\Platforms\SqlitePlatform; -use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Types\Types; use GuzzleHttp\Exception\ClientException; use OC; use OC\AppFramework\Http; @@ -634,7 +634,7 @@ Raw output $column = $table->getColumn($columnName); $isAutoIncrement = $column->getAutoincrement(); $isAutoIncrementOnSqlite = $isSqlite && $isAutoIncrement; - if ($column->getType()->getName() !== Type::BIGINT && !$isAutoIncrementOnSqlite) { + if ($column->getType()->getName() !== Types::BIGINT && !$isAutoIncrementOnSqlite) { $pendingColumns[] = $tableName . '.' . $columnName; } } diff --git a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607104347.php b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607104347.php index c7a7e9ffd46..bbc674f7e4c 100644 --- a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607104347.php +++ b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607104347.php @@ -24,7 +24,7 @@ namespace OCA\TwoFactorBackupCodes\Migration; -use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Types\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; @@ -44,20 +44,20 @@ class Version1002Date20170607104347 extends SimpleMigrationStep { if (!$schema->hasTable('twofactor_backupcodes')) { $table = $schema->createTable('twofactor_backupcodes'); - $table->addColumn('id', Type::INTEGER, [ + $table->addColumn('id', Types::INTEGER, [ 'autoincrement' => true, 'notnull' => true, 'length' => 20, ]); - $table->addColumn('user_id', Type::STRING, [ + $table->addColumn('user_id', Types::STRING, [ 'notnull' => true, 'length' => 64, ]); - $table->addColumn('code', Type::STRING, [ + $table->addColumn('code', Types::STRING, [ 'notnull' => true, 'length' => 64, ]); - $table->addColumn('used', Type::INTEGER, [ + $table->addColumn('used', Types::INTEGER, [ 'notnull' => true, 'length' => 1, 'default' => 0, diff --git a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170919123342.php b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170919123342.php index 93ac3161670..c759caf515f 100644 --- a/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170919123342.php +++ b/apps/twofactor_backupcodes/lib/Migration/Version1002Date20170919123342.php @@ -25,6 +25,7 @@ namespace OCA\TwoFactorBackupCodes\Migration; use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Types\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; @@ -47,8 +48,8 @@ class Version1002Date20170919123342 extends SimpleMigrationStep { $column->setDefault(''); $column = $table->getColumn('used'); - if ($column->getType()->getName() !== Type::SMALLINT) { - $column->setType(Type::getType(Type::SMALLINT)); + if ($column->getType()->getName() !== Types::SMALLINT) { + $column->setType(Type::getType(Types::SMALLINT)); $column->setOptions(['length' => 6]); } diff --git a/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php b/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php index cfbd852d49f..fae4fda5bc3 100644 --- a/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php +++ b/apps/workflowengine/lib/Migration/Version2000Date20190808074233.php @@ -6,7 +6,7 @@ namespace OCA\WorkflowEngine\Migration; use Closure; use Doctrine\DBAL\Schema\Table; -use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Types\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; @@ -25,25 +25,25 @@ class Version2000Date20190808074233 extends SimpleMigrationStep { if (!$schema->hasTable('flow_checks')) { $table = $schema->createTable('flow_checks'); - $table->addColumn('id', Type::INTEGER, [ + $table->addColumn('id', Types::INTEGER, [ 'autoincrement' => true, 'notnull' => true, 'length' => 4, ]); - $table->addColumn('class', Type::STRING, [ + $table->addColumn('class', Types::STRING, [ 'notnull' => true, 'length' => 256, 'default' => '', ]); - $table->addColumn('operator', Type::STRING, [ + $table->addColumn('operator', Types::STRING, [ 'notnull' => true, 'length' => 16, 'default' => '', ]); - $table->addColumn('value', Type::TEXT, [ + $table->addColumn('value', Types::TEXT, [ 'notnull' => false, ]); - $table->addColumn('hash', Type::STRING, [ + $table->addColumn('hash', Types::STRING, [ 'notnull' => true, 'length' => 32, 'default' => '', @@ -54,25 +54,25 @@ class Version2000Date20190808074233 extends SimpleMigrationStep { if (!$schema->hasTable('flow_operations')) { $table = $schema->createTable('flow_operations'); - $table->addColumn('id', Type::INTEGER, [ + $table->addColumn('id', Types::INTEGER, [ 'autoincrement' => true, 'notnull' => true, 'length' => 4, ]); - $table->addColumn('class', Type::STRING, [ + $table->addColumn('class', Types::STRING, [ 'notnull' => true, 'length' => 256, 'default' => '', ]); - $table->addColumn('name', Type::STRING, [ + $table->addColumn('name', Types::STRING, [ 'notnull' => true, 'length' => 256, 'default' => '', ]); - $table->addColumn('checks', Type::TEXT, [ + $table->addColumn('checks', Types::TEXT, [ 'notnull' => false, ]); - $table->addColumn('operation', Type::TEXT, [ + $table->addColumn('operation', Types::TEXT, [ 'notnull' => false, ]); $this->ensureEntityColumns($table); @@ -84,22 +84,22 @@ class Version2000Date20190808074233 extends SimpleMigrationStep { if (!$schema->hasTable('flow_operations_scope')) { $table = $schema->createTable('flow_operations_scope'); - $table->addColumn('id', Type::BIGINT, [ + $table->addColumn('id', Types::BIGINT, [ 'autoincrement' => true, 'notnull' => true, 'length' => 4, ]); - $table->addColumn('operation_id', Type::INTEGER, [ + $table->addColumn('operation_id', Types::INTEGER, [ 'notnull' => true, 'length' => 4, 'default' => 0, ]); - $table->addColumn('type', Type::INTEGER, [ + $table->addColumn('type', Types::INTEGER, [ 'notnull' => true, 'length' => 4, 'default' => 0, ]); - $table->addColumn('value', Type::STRING, [ + $table->addColumn('value', Types::STRING, [ 'notnull' => false, 'length' => 64, 'default' => '', @@ -113,14 +113,14 @@ class Version2000Date20190808074233 extends SimpleMigrationStep { protected function ensureEntityColumns(Table $table) { if (!$table->hasColumn('entity')) { - $table->addColumn('entity', Type::STRING, [ + $table->addColumn('entity', Types::STRING, [ 'notnull' => true, 'length' => 256, 'default' => '', ]); } if (!$table->hasColumn('events')) { - $table->addColumn('events', Type::TEXT, [ + $table->addColumn('events', Types::TEXT, [ 'notnull' => true, 'default' => '[]', ]); |