From fe73001c361d3eea4992a2649f8516cb99339320 Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Mon, 30 Mar 2020 18:19:44 +0000 Subject: [PATCH] [DATABASE] Changed the type of the 'id' field of the ProfileList table from serial to int, as doctrine complains otherwise --- src/Entity/ProfileList.php | 18 ++++++++---------- src/Util/SchemaDefDriver.php | 2 -- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/Entity/ProfileList.php b/src/Entity/ProfileList.php index ea731440d2..5dd09f513d 100644 --- a/src/Entity/ProfileList.php +++ b/src/Entity/ProfileList.php @@ -166,15 +166,13 @@ class ProfileList return [ 'name' => 'profile_list', 'fields' => [ - 'id' => ['type' => 'serial', 'not null' => true, 'description' => 'unique identifier'], - 'tagger' => ['type' => 'int', 'not null' => true, 'description' => 'user making the tag'], - 'tag' => ['type' => 'varchar', 'length' => 64, 'not null' => true, 'description' => 'people tag'], - 'description' => ['type' => 'text', 'description' => 'description of the people tag'], - 'private' => ['type' => 'bool', 'default' => false, 'description' => 'is this tag private'], - - 'created' => ['type' => 'datetime', 'not null' => true, 'default' => '0000-00-00 00:00:00', 'description' => 'date the tag was added'], - 'modified' => ['type' => 'datetime', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date the tag was modified'], - + 'id' => ['type' => 'int', 'not null' => true, 'description' => 'unique identifier'], + 'tagger' => ['type' => 'int', 'not null' => true, 'description' => 'user making the tag'], + 'tag' => ['type' => 'varchar', 'length' => 64, 'not null' => true, 'description' => 'people tag'], + 'description' => ['type' => 'text', 'description' => 'description of the people tag'], + 'private' => ['type' => 'bool', 'default' => false, 'description' => 'is this tag private'], + 'created' => ['type' => 'datetime', 'not null' => true, 'default' => '0000-00-00 00:00:00', 'description' => 'date the tag was added'], + 'modified' => ['type' => 'datetime', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date the tag was modified'], 'uri' => ['type' => 'varchar', 'length' => 191, 'description' => 'universal identifier'], 'mainpage' => ['type' => 'varchar', 'length' => 191, 'description' => 'page to link to'], 'tagged_count' => ['type' => 'int', 'default' => 0, 'description' => 'number of people tagged with this tag by this user'], @@ -196,4 +194,4 @@ class ProfileList ], ]; } -} \ No newline at end of file +} diff --git a/src/Util/SchemaDefDriver.php b/src/Util/SchemaDefDriver.php index b970786df1..08bc254e49 100644 --- a/src/Util/SchemaDefDriver.php +++ b/src/Util/SchemaDefDriver.php @@ -79,8 +79,6 @@ class SchemaDefDriver extends StaticPHPDriver 'options' => ['comment' => $schema['description'] ?? ''], ]); - echo "{$class_name}\n"; - foreach ($schema['fields'] as $name => $opts) { // TODO // Convert old to new types