diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/Command/Db/ConvertFilecacheBigInt.php | 5 | ||||
-rw-r--r-- | core/Migrations/Version13000Date20170705121758.php | 16 | ||||
-rw-r--r-- | core/Migrations/Version13000Date20170718121200.php | 26 | ||||
-rw-r--r-- | core/Migrations/Version14000Date20180710092004.php | 4 | ||||
-rw-r--r-- | core/Migrations/Version16000Date20190207141427.php | 22 | ||||
-rw-r--r-- | core/Migrations/Version16000Date20190212081545.php | 24 | ||||
-rw-r--r-- | core/Migrations/Version16000Date20190428150708.php | 4 | ||||
-rw-r--r-- | core/Migrations/Version17000Date20190514105811.php | 10 | ||||
-rw-r--r-- | core/Migrations/Version18000Date20190920085628.php | 4 | ||||
-rw-r--r-- | core/Migrations/Version18000Date20191014105105.php | 18 |
10 files changed, 67 insertions, 66 deletions
diff --git a/core/Command/Db/ConvertFilecacheBigInt.php b/core/Command/Db/ConvertFilecacheBigInt.php index 4a833fbbede..4067838acf0 100644 --- a/core/Command/Db/ConvertFilecacheBigInt.php +++ b/core/Command/Db/ConvertFilecacheBigInt.php @@ -29,6 +29,7 @@ namespace OC\Core\Command\Db; use Doctrine\DBAL\Platforms\SqlitePlatform; use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Types\Types; use OC\DB\SchemaWrapper; use OCP\IDBConnection; use Symfony\Component\Console\Command\Command; @@ -88,8 +89,8 @@ class ConvertFilecacheBigInt extends Command { $column = $table->getColumn($columnName); $isAutoIncrement = $column->getAutoincrement(); $isAutoIncrementOnSqlite = $isSqlite && $isAutoIncrement; - if ($column->getType()->getName() !== Type::BIGINT && !$isAutoIncrementOnSqlite) { - $column->setType(Type::getType(Type::BIGINT)); + if ($column->getType()->getName() !== Types::BIGINT && !$isAutoIncrementOnSqlite) { + $column->setType(Type::getType(Types::BIGINT)); $column->setOptions(['length' => 20]); $updates[] = '* ' . $tableName . '.' . $columnName; diff --git a/core/Migrations/Version13000Date20170705121758.php b/core/Migrations/Version13000Date20170705121758.php index 21abebf1584..c416fd24a4b 100644 --- a/core/Migrations/Version13000Date20170705121758.php +++ b/core/Migrations/Version13000Date20170705121758.php @@ -24,7 +24,7 @@ namespace OC\Core\Migrations; -use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Types\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; @@ -44,15 +44,15 @@ class Version13000Date20170705121758 extends SimpleMigrationStep { if (!$schema->hasTable('personal_sections')) { $table = $schema->createTable('personal_sections'); - $table->addColumn('id', Type::STRING, [ + $table->addColumn('id', Types::STRING, [ 'notnull' => false, 'length' => 64, ]); - $table->addColumn('class', Type::STRING, [ + $table->addColumn('class', Types::STRING, [ 'notnull' => true, 'length' => 255, ]); - $table->addColumn('priority', Type::INTEGER, [ + $table->addColumn('priority', Types::INTEGER, [ 'notnull' => true, 'length' => 6, 'default' => 0, @@ -65,20 +65,20 @@ class Version13000Date20170705121758 extends SimpleMigrationStep { if (!$schema->hasTable('personal_settings')) { $table = $schema->createTable('personal_settings'); - $table->addColumn('id', Type::INTEGER, [ + $table->addColumn('id', Types::INTEGER, [ 'autoincrement' => true, 'notnull' => true, 'length' => 20, ]); - $table->addColumn('class', Type::STRING, [ + $table->addColumn('class', Types::STRING, [ 'notnull' => true, 'length' => 255, ]); - $table->addColumn('section', Type::STRING, [ + $table->addColumn('section', Types::STRING, [ 'notnull' => false, 'length' => 64, ]); - $table->addColumn('priority', Type::INTEGER, [ + $table->addColumn('priority', Types::INTEGER, [ 'notnull' => true, 'length' => 6, 'default' => 0, diff --git a/core/Migrations/Version13000Date20170718121200.php b/core/Migrations/Version13000Date20170718121200.php index 7e48059f798..e150a747d05 100644 --- a/core/Migrations/Version13000Date20170718121200.php +++ b/core/Migrations/Version13000Date20170718121200.php @@ -28,7 +28,7 @@ namespace OC\Core\Migrations; -use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Types\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; @@ -72,7 +72,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep { 'notnull' => false, 'length' => 64, ]); - $table->addColumn('numeric_id', Type::BIGINT, [ + $table->addColumn('numeric_id', Types::BIGINT, [ 'autoincrement' => true, 'notnull' => true, 'length' => 20, @@ -95,11 +95,11 @@ class Version13000Date20170718121200 extends SimpleMigrationStep { 'notnull' => true, 'length' => 4, ]); - $table->addColumn('storage_id', Type::BIGINT, [ + $table->addColumn('storage_id', Types::BIGINT, [ 'notnull' => true, 'length' => 20, ]); - $table->addColumn('root_id', Type::BIGINT, [ + $table->addColumn('root_id', Types::BIGINT, [ 'notnull' => true, 'length' => 20, ]); @@ -111,7 +111,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep { 'notnull' => true, 'length' => 4000, ]); - $table->addColumn('mount_id', Type::BIGINT, [ + $table->addColumn('mount_id', Types::BIGINT, [ 'notnull' => false, 'length' => 20, ]); @@ -125,7 +125,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep { if (!$schema->hasTable('mimetypes')) { $table = $schema->createTable('mimetypes'); - $table->addColumn('id', Type::BIGINT, [ + $table->addColumn('id', Types::BIGINT, [ 'autoincrement' => true, 'notnull' => true, 'length' => 20, @@ -141,12 +141,12 @@ class Version13000Date20170718121200 extends SimpleMigrationStep { if (!$schema->hasTable('filecache')) { $table = $schema->createTable('filecache'); - $table->addColumn('fileid', Type::BIGINT, [ + $table->addColumn('fileid', Types::BIGINT, [ 'autoincrement' => true, 'notnull' => true, 'length' => 20, ]); - $table->addColumn('storage', Type::BIGINT, [ + $table->addColumn('storage', Types::BIGINT, [ 'notnull' => true, 'length' => 20, 'default' => 0, @@ -160,7 +160,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep { 'length' => 32, 'default' => '', ]); - $table->addColumn('parent', Type::BIGINT, [ + $table->addColumn('parent', Types::BIGINT, [ 'notnull' => true, 'length' => 20, 'default' => 0, @@ -169,12 +169,12 @@ class Version13000Date20170718121200 extends SimpleMigrationStep { 'notnull' => false, 'length' => 250, ]); - $table->addColumn('mimetype', Type::BIGINT, [ + $table->addColumn('mimetype', Types::BIGINT, [ 'notnull' => true, 'length' => 20, 'default' => 0, ]); - $table->addColumn('mimepart', Type::BIGINT, [ + $table->addColumn('mimepart', Types::BIGINT, [ 'notnull' => true, 'length' => 20, 'default' => 0, @@ -184,12 +184,12 @@ class Version13000Date20170718121200 extends SimpleMigrationStep { 'length' => 8, 'default' => 0, ]); - $table->addColumn('mtime', Type::BIGINT, [ + $table->addColumn('mtime', Types::BIGINT, [ 'notnull' => true, 'length' => 20, 'default' => 0, ]); - $table->addColumn('storage_mtime', Type::BIGINT, [ + $table->addColumn('storage_mtime', Types::BIGINT, [ 'notnull' => true, 'length' => 20, 'default' => 0, diff --git a/core/Migrations/Version14000Date20180710092004.php b/core/Migrations/Version14000Date20180710092004.php index f44dbf42401..525836f9311 100644 --- a/core/Migrations/Version14000Date20180710092004.php +++ b/core/Migrations/Version14000Date20180710092004.php @@ -27,7 +27,7 @@ declare(strict_types=1); namespace OC\Core\Migrations; -use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Types\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; @@ -40,7 +40,7 @@ class Version14000Date20180710092004 extends SimpleMigrationStep { $table = $schema->getTable('share'); if (!$table->hasColumn('password_by_talk')) { - $table->addColumn('password_by_talk', Type::BOOLEAN, [ + $table->addColumn('password_by_talk', Types::BOOLEAN, [ 'default' => 0, ]); } diff --git a/core/Migrations/Version16000Date20190207141427.php b/core/Migrations/Version16000Date20190207141427.php index 1b5777a9212..52511a8e321 100644 --- a/core/Migrations/Version16000Date20190207141427.php +++ b/core/Migrations/Version16000Date20190207141427.php @@ -28,7 +28,7 @@ declare(strict_types=1); namespace OC\Core\Migrations; use Closure; -use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Types\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; @@ -49,11 +49,11 @@ class Version16000Date20190207141427 extends SimpleMigrationStep { if (!$schema->hasTable('collres_collections')) { $table = $schema->createTable('collres_collections'); - $table->addColumn('id', Type::BIGINT, [ + $table->addColumn('id', Types::BIGINT, [ 'autoincrement' => true, 'notnull' => true, ]); - $table->addColumn('name', Type::STRING, [ + $table->addColumn('name', Types::STRING, [ 'notnull' => true, 'length' => 64, ]); @@ -64,14 +64,14 @@ class Version16000Date20190207141427 extends SimpleMigrationStep { if (!$schema->hasTable('collres_resources')) { $table = $schema->createTable('collres_resources'); - $table->addColumn('collection_id', Type::BIGINT, [ + $table->addColumn('collection_id', Types::BIGINT, [ 'notnull' => true, ]); - $table->addColumn('resource_type', Type::STRING, [ + $table->addColumn('resource_type', Types::STRING, [ 'notnull' => true, 'length' => 64, ]); - $table->addColumn('resource_id', Type::STRING, [ + $table->addColumn('resource_id', Types::STRING, [ 'notnull' => true, 'length' => 64, ]); @@ -82,25 +82,25 @@ class Version16000Date20190207141427 extends SimpleMigrationStep { if (!$schema->hasTable('collres_accesscache')) { $table = $schema->createTable('collres_accesscache'); - $table->addColumn('user_id', Type::STRING, [ + $table->addColumn('user_id', Types::STRING, [ 'notnull' => true, 'length' => 64, ]); - $table->addColumn('collection_id', Type::BIGINT, [ + $table->addColumn('collection_id', Types::BIGINT, [ 'notnull' => false, 'default' => 0, ]); - $table->addColumn('resource_type', Type::STRING, [ + $table->addColumn('resource_type', Types::STRING, [ 'notnull' => false, 'length' => 64, 'default' => '', ]); - $table->addColumn('resource_id', Type::STRING, [ + $table->addColumn('resource_id', Types::STRING, [ 'notnull' => false, 'length' => 64, 'default' => '', ]); - $table->addColumn('access', Type::SMALLINT, [ + $table->addColumn('access', Types::SMALLINT, [ 'notnull' => true, 'default' => 0, ]); diff --git a/core/Migrations/Version16000Date20190212081545.php b/core/Migrations/Version16000Date20190212081545.php index 71ad253453c..86494db4794 100644 --- a/core/Migrations/Version16000Date20190212081545.php +++ b/core/Migrations/Version16000Date20190212081545.php @@ -29,7 +29,7 @@ declare(strict_types=1); namespace OC\Core\Migrations; use Closure; -use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Types\Types; use OCP\DB\ISchemaWrapper; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; @@ -47,52 +47,52 @@ class Version16000Date20190212081545 extends SimpleMigrationStep { $schema = $schemaClosure(); $table = $schema->createTable('login_flow_v2'); - $table->addColumn('id', Type::BIGINT, [ + $table->addColumn('id', Types::BIGINT, [ 'autoincrement' => true, 'notnull' => true, 'length' => 20, 'unsigned' => true, ]); - $table->addColumn('timestamp', Type::BIGINT, [ + $table->addColumn('timestamp', Types::BIGINT, [ 'notnull' => true, 'length' => 20, 'unsigned' => true, ]); - $table->addColumn('started', Type::SMALLINT, [ + $table->addColumn('started', Types::SMALLINT, [ 'notnull' => true, 'length' => 1, 'unsigned' => true, 'default' => 0, ]); - $table->addColumn('poll_token', Type::STRING, [ + $table->addColumn('poll_token', Types::STRING, [ 'notnull' => true, 'length' => 255, ]); - $table->addColumn('login_token', Type::STRING, [ + $table->addColumn('login_token', Types::STRING, [ 'notnull' => true, 'length' => 255, ]); - $table->addColumn('public_key', Type::TEXT, [ + $table->addColumn('public_key', Types::TEXT, [ 'notnull' => true, 'length' => 32768, ]); - $table->addColumn('private_key', Type::TEXT, [ + $table->addColumn('private_key', Types::TEXT, [ 'notnull' => true, 'length' => 32768, ]); - $table->addColumn('client_name', Type::STRING, [ + $table->addColumn('client_name', Types::STRING, [ 'notnull' => true, 'length' => 255, ]); - $table->addColumn('login_name', Type::STRING, [ + $table->addColumn('login_name', Types::STRING, [ 'notnull' => false, 'length' => 255, ]); - $table->addColumn('server', Type::STRING, [ + $table->addColumn('server', Types::STRING, [ 'notnull' => false, 'length' => 255, ]); - $table->addColumn('app_password', Type::STRING, [ + $table->addColumn('app_password', Types::STRING, [ 'notnull' => false, 'length' => 1024, ]); diff --git a/core/Migrations/Version16000Date20190428150708.php b/core/Migrations/Version16000Date20190428150708.php index 4e61dfd6be9..546d4c19e14 100644 --- a/core/Migrations/Version16000Date20190428150708.php +++ b/core/Migrations/Version16000Date20190428150708.php @@ -28,7 +28,7 @@ declare(strict_types=1); namespace OC\Core\Migrations; 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,7 +48,7 @@ class Version16000Date20190428150708 extends SimpleMigrationStep { if ($schema->hasTable('collres_accesscache')) { $table = $schema->getTable('collres_accesscache'); - $table->addColumn('access', Type::BOOLEAN, [ + $table->addColumn('access', Types::BOOLEAN, [ 'notnull' => true, 'default' => false ]); diff --git a/core/Migrations/Version17000Date20190514105811.php b/core/Migrations/Version17000Date20190514105811.php index 994e85e062e..49dbb1ad1b3 100644 --- a/core/Migrations/Version17000Date20190514105811.php +++ b/core/Migrations/Version17000Date20190514105811.php @@ -30,7 +30,7 @@ declare(strict_types=1); namespace OC\Core\Migrations; 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 Version17000Date20190514105811 extends SimpleMigrationStep { $schema = $schemaClosure(); if (!$schema->hasTable('filecache_extended')) { $table = $schema->createTable('filecache_extended'); - $table->addColumn('fileid', Type::BIGINT, [ + $table->addColumn('fileid', Types::BIGINT, [ 'notnull' => true, 'length' => 4, 'unsigned' => true, ]); - $table->addColumn('metadata_etag', Type::STRING, [ + $table->addColumn('metadata_etag', Types::STRING, [ 'notnull' => false, 'length' => 40, ]); - $table->addColumn('creation_time', Type::BIGINT, [ + $table->addColumn('creation_time', Types::BIGINT, [ 'notnull' => true, 'length' => 20, 'default' => 0, ]); - $table->addColumn('upload_time', Type::BIGINT, [ + $table->addColumn('upload_time', Types::BIGINT, [ 'notnull' => true, 'length' => 20, 'default' => 0, diff --git a/core/Migrations/Version18000Date20190920085628.php b/core/Migrations/Version18000Date20190920085628.php index a5ade011ccd..2f7859601f6 100644 --- a/core/Migrations/Version18000Date20190920085628.php +++ b/core/Migrations/Version18000Date20190920085628.php @@ -28,7 +28,7 @@ declare(strict_types=1); namespace OC\Core\Migrations; use Closure; -use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Types\Types; use OCP\DB\ISchemaWrapper; use OCP\IDBConnection; use OCP\Migration\IOutput; @@ -56,7 +56,7 @@ class Version18000Date20190920085628 extends SimpleMigrationStep { if ($schema->hasTable('groups')) { $table = $schema->getTable('groups'); - $table->addColumn('displayname', Type::STRING, [ + $table->addColumn('displayname', Types::STRING, [ 'notnull' => true, 'length' => 255, 'default' => '', diff --git a/core/Migrations/Version18000Date20191014105105.php b/core/Migrations/Version18000Date20191014105105.php index 62a8e2cc37f..84c797cc57d 100644 --- a/core/Migrations/Version18000Date20191014105105.php +++ b/core/Migrations/Version18000Date20191014105105.php @@ -27,7 +27,7 @@ declare(strict_types=1); namespace OC\Core\Migrations; use Closure; -use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Types\Types; use OCP\DB\ISchemaWrapper; use OCP\IDBConnection; use OCP\Migration\SimpleMigrationStep; @@ -53,34 +53,34 @@ class Version18000Date20191014105105 extends SimpleMigrationStep { $schema = $schemaClosure(); $table = $schema->createTable('direct_edit'); - $table->addColumn('id', Type::BIGINT, [ + $table->addColumn('id', Types::BIGINT, [ 'autoincrement' => true, 'notnull' => true, ]); - $table->addColumn('editor_id', Type::STRING, [ + $table->addColumn('editor_id', Types::STRING, [ 'notnull' => true, 'length' => 64, ]); - $table->addColumn('token', Type::STRING, [ + $table->addColumn('token', Types::STRING, [ 'notnull' => true, 'length' => 64, ]); - $table->addColumn('file_id', Type::BIGINT, [ + $table->addColumn('file_id', Types::BIGINT, [ 'notnull' => true, ]); - $table->addColumn('user_id', Type::STRING, [ + $table->addColumn('user_id', Types::STRING, [ 'notnull' => false, 'length' => 64, ]); - $table->addColumn('share_id', Type::BIGINT, [ + $table->addColumn('share_id', Types::BIGINT, [ 'notnull' => false ]); - $table->addColumn('timestamp', Type::BIGINT, [ + $table->addColumn('timestamp', Types::BIGINT, [ 'notnull' => true, 'length' => 20, 'unsigned' => true, ]); - $table->addColumn('accessed', Type::BOOLEAN, [ + $table->addColumn('accessed', Types::BOOLEAN, [ 'notnull' => true, 'default' => false ]); |