From 87dd760a89891d15f75175e5caa43a3983a28d38 Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Tue, 30 Jun 2020 22:12:06 +0200 Subject: Replace TYPE with TYPES As TYPE::* is deprecated. Signed-off-by: Daniel Kesselberg --- .../lib/Migration/Version1002Date20170607104347.php | 10 +++++----- .../lib/Migration/Version1002Date20170919123342.php | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'apps/twofactor_backupcodes/lib/Migration') 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]); } -- cgit v1.2.3