From dd307fa353335d5e9d93683f23ed2b69d7b4ac0b Mon Sep 17 00:00:00 2001 From: chandi Langecker Date: Mon, 5 Sep 2022 12:02:35 +0200 Subject: [PATCH] use nextcloud's database type constants Signed-off-by: chandi Langecker --- lib/Migration/Version10900Date202206151724222.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/Migration/Version10900Date202206151724222.php b/lib/Migration/Version10900Date202206151724222.php index 58fddf162..1fac4d10a 100644 --- a/lib/Migration/Version10900Date202206151724222.php +++ b/lib/Migration/Version10900Date202206151724222.php @@ -26,6 +26,7 @@ namespace OCA\Deck\Migration; use Closure; use OCP\DB\ISchemaWrapper; +use OCP\DB\Types; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; @@ -35,23 +36,23 @@ class Version10900Date202206151724222 extends SimpleMigrationStep { if (!$schema->hasTable('deck_sessions')) { $table = $schema->createTable('deck_sessions'); - $table->addColumn('id', 'integer', [ + $table->addColumn('id', Types::INTEGER, [ 'autoincrement' => true, 'notnull' => true, 'unsigned' => true, ]); - $table->addColumn('user_id', 'string', [ + $table->addColumn('user_id', Types::STRING, [ 'notnull' => false, 'length' => 64, ]); - $table->addColumn('board_id', 'integer', [ + $table->addColumn('board_id', Types::INTEGER, [ 'notnull' => false, ]); - $table->addColumn('token', 'string', [ + $table->addColumn('token', Types::STRING, [ 'notnull' => true, 'length' => 64, ]); - $table->addColumn('last_contact', 'integer', [ + $table->addColumn('last_contact', Types::INTEGER, [ 'notnull' => true, 'length' => 20, 'unsigned' => true,