bin/console doctrine:schema:update --dump-sql
ALTER TABLE items CHANGE id id int(11) NOT NULL AUTO_INCREMENT;
Same message after bin/console doctrine:schema:update --force execution.
bin/console doctrine:schema:validate:
[Database] FAIL - The database schema is not in sync with the current mapping file.
/**
* @var int
*
* @ORM\Column(type="integer", options={"unsigned": true}, unique=true, columnDefinition="int(11) NOT NULL AUTO_INCREMENT")
*/
private $id;
mysql> show create table items;
+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| items | CREATE TABLE `items` (
`checksum` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`checksum`),
UNIQUE KEY `...` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci |
+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
Platform: MySQL 5.7
This is a known limitation that we cannot fix.