Skip to content

Commit

Permalink
Merge pull request #543 from nextcloud/fix/db-types
Browse files Browse the repository at this point in the history
Fix dbal type constants
  • Loading branch information
nickvergessen authored Jan 7, 2021
2 parents c0a2f46 + e4f4399 commit 3bc6e4a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
9 changes: 4 additions & 5 deletions lib/Migration/Version2006Date20170808154933.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

namespace OCA\Activity\Migration;

use Doctrine\DBAL\Types\Type;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\SimpleMigrationStep;
use OCP\Migration\IOutput;
Expand All @@ -43,7 +43,7 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op

if (!$schema->hasTable('activity')) {
$table = $schema->createTable('activity');
$table->addColumn('activity_id', Type::BIGINT, [
$table->addColumn('activity_id', Types::BIGINT, [
'autoincrement' => true,
'notnull' => true,
'length' => 20,
Expand Down Expand Up @@ -100,7 +100,7 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op
'notnull' => false,
'length' => 255,
]);
$table->addColumn('object_id', Type::BIGINT, [
$table->addColumn('object_id', Types::BIGINT, [
'notnull' => true,
'length' => 20,
'default' => 0,
Expand All @@ -115,7 +115,7 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op

if (!$schema->hasTable('activity_mq')) {
$table = $schema->createTable('activity_mq');
$table->addColumn('mail_id', Type::BIGINT, [
$table->addColumn('mail_id', Types::BIGINT, [
'autoincrement' => true,
'notnull' => true,
'length' => 20,
Expand Down Expand Up @@ -156,5 +156,4 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op
}
return $schema;
}

}
6 changes: 3 additions & 3 deletions lib/Migration/Version2008Date20181011095117.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

use Closure;
use Doctrine\DBAL\Schema\SchemaException;
use Doctrine\DBAL\Types\Type;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\SimpleMigrationStep;
use OCP\Migration\IOutput;
Expand All @@ -49,11 +49,11 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
return null;
}

$table->addColumn('object_type', Type::STRING, [
$table->addColumn('object_type', Types::STRING, [
'notnull' => false,
'length' => 255,
]);
$table->addColumn('object_id', Type::BIGINT, [
$table->addColumn('object_id', Types::BIGINT, [
'notnull' => true,
'length' => 20,
'default' => 0,
Expand Down
1 change: 0 additions & 1 deletion lib/Migration/Version2011Date20201006132546.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
namespace OCA\Activity\Migration;

use Closure;
use Doctrine\DBAL\Types\Type;
use OCP\DB\ISchemaWrapper;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
Expand Down
1 change: 0 additions & 1 deletion lib/Migration/Version2011Date20201006132547.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
namespace OCA\Activity\Migration;

use Closure;
use Doctrine\DBAL\Types\Type;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
Expand Down

0 comments on commit 3bc6e4a

Please sign in to comment.