From bd610e28b5a07597b03c5341f19c0ab70cc25440 Mon Sep 17 00:00:00 2001 From: Ole Morten Date: Tue, 9 Mar 2021 20:28:00 +0100 Subject: [PATCH] Use new types introduced in Nextcloud 21 and bump compatibility Signed-off-by: Ole Morten --- appinfo/info.xml | 2 +- lib/Migration/Version0010Date20200630193751.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index a8f7fa4..2080e88 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -32,6 +32,6 @@ Read the [documentation](https://github.com/nextcloud/user_external#readme) to l https://github.com/nextcloud/user_external/issues https://github.com/nextcloud/user_external.git - + diff --git a/lib/Migration/Version0010Date20200630193751.php b/lib/Migration/Version0010Date20200630193751.php index e59a250..d1e6ba0 100644 --- a/lib/Migration/Version0010Date20200630193751.php +++ b/lib/Migration/Version0010Date20200630193751.php @@ -26,8 +26,8 @@ declare(strict_types=1); namespace OCA\User_external\Migration; use Closure; -use Doctrine\DBAL\Types\Type; use OCP\DB\ISchemaWrapper; +use OCP\DB\Types; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; @@ -44,17 +44,17 @@ class Version0010Date20200630193751 extends SimpleMigrationStep { if (!$schema->hasTable('users_external')) { $table = $schema->createTable('users_external'); - $table->addColumn('backend', Type::STRING, [ + $table->addColumn('backend', Types::STRING, [ 'notnull' => true, 'length' => 128, 'default' => '', ]); - $table->addColumn('uid', Type::STRING, [ + $table->addColumn('uid', Types::STRING, [ 'notnull' => true, 'length' => 64, 'default' => '', ]); - $table->addColumn('displayname', Type::STRING, [ + $table->addColumn('displayname', Types::STRING, [ 'notnull' => false, 'length' => 64, ]);