diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2020-06-30 22:12:06 +0200 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2020-06-30 23:46:22 +0200 |
commit | 87dd760a89891d15f75175e5caa43a3983a28d38 (patch) | |
tree | b9365127a8f6856044739f32329d88e14684ee8a /apps/twofactor_backupcodes | |
parent | 43216f0ac9e3841747019b8c2def0c58e71b8cca (diff) | |
download | nextcloud-server-87dd760a89891d15f75175e5caa43a3983a28d38.tar.gz nextcloud-server-87dd760a89891d15f75175e5caa43a3983a28d38.zip |
Replace TYPE with TYPES
As TYPE::* is deprecated.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'apps/twofactor_backupcodes')
-rw-r--r-- | apps/twofactor_backupcodes/lib/Migration/Version1002Date20170607104347.php | 10 | ||||
-rw-r--r-- | apps/twofactor_backupcodes/lib/Migration/Version1002Date20170919123342.php | 5 |
2 files changed, 8 insertions, 7 deletions
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]); } |