doctrine / DoctrineBundle

Symfony Bundle for Doctrine ORM and DBAL
https://www.doctrine-project.org/projects/doctrine-bundle.html
MIT License
4.72k stars 454 forks source link

schema:validate fails #782

Closed ob1201 closed 6 years ago

ob1201 commented 6 years ago

For a Symfony4 install with

doctrine/cache                           v1.7.1             = v1.7.1             Caching library offering an object-oriented API for many cache backends
doctrine/doctrine-cache-bundle           1.3.2              = 1.3.2              Symfony Bundle for Doctrine Cache
doctrine/phpcr-bundle                    dev-master bb380a5 = dev-master bb380a5 Symfony DoctrinePHPCRBundle
doctrine/phpcr-odm                       1.4.4              = 1.4.4              Object-Document-Mapper for PHPCR
friendsofsymfony/http-cache              2.1.2              = 2.1.2              Tools to manage HTTP caching proxies with PHP
jackalope/jackalope                      1.3.5              = 1.3.5              Jackalope PHPCR library
phpcr/phpcr                              2.1.4              = 2.1.4              PHP Content Repository interfaces
phpcr/phpcr-utils                        1.4.0              = 1.4.0              PHP Content Repository implementation independant utilities
psr/cache                                1.0.1              = 1.0.1              Common interface for caching libraries
psr/simple-cache                         1.0.0              = 1.0.0              Common interfaces for simple caching
sonata-project/admin-bundle              3.31.1             = 3.31.1             The missing Symfony Admin Generator
sonata-project/block-bundle              3.12.0             = 3.12.0             Symfony SonataBlockBundle
sonata-project/cache                     1.1.1              ~ 2.0.1              Cache library
sonata-project/cache-bundle              2.x-dev c0de243    ~ dev-master 4010ae3 This bundle provides caching services
sonata-project/core-bundle               3.x-dev a71caca    ~ dev-master 885ce54 Symfony SonataCoreBundle
sonata-project/datagrid-bundle           2.3.1              = 2.3.1              Symfony SonataDatagridBundle
sonata-project/doctrine-extensions       1.0.2              = 1.0.2              Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.4.2              = 3.4.2              Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/easy-extends-bundle       2.5.0              = 2.5.0              Symfony SonataEasyExtendsBundle
sonata-project/exporter                  1.8.0              = 1.8.0              Lightweight Exporter library
sonata-project/google-authenticator      2.0.0              = 2.0.0              Library to integrate Google Authenticator into a PHP project
sonata-project/media-bundle              3.10.2             = 3.10.2             Symfony SonataMediaBundle
sonata-project/notification-bundle       3.x-dev eecadfb    ~ dev-master 2f04b00 Symfony SonataNotificationBundle
sonata-project/page-bundle               dev-master 5c30634 = dev-master 5c30634 This bundle provides a Site and Page management through container and block services
sonata-project/seo-bundle                2.5.0              = 2.5.0              Symfony SonataSeoBundle
sonata-project/user-bundle               4.1.1              = 4.1.1              Symfony SonataUserBundle
symfony-cmf/core-bundle                  dev-master dfba976 = dev-master dfba976 Symfony CMF Core Bundle
symfony-cmf/menu-bundle                  dev-master 5c6bd22 = dev-master 5c6bd22 Symfony CMF Menu Bundle
symfony-cmf/resource                     1.0.0              = 1.0.0              Bundle which facilitates document resource location via Puli
symfony-cmf/resource-bundle              dev-master 331fb91 = dev-master 331fb91 Bundle which facilitates document resource location
symfony-cmf/resource-rest-bundle         dev-master 8f2ccc6 = dev-master 8f2ccc6 Bundle which provides a REST API for resources
symfony-cmf/routing                      dev-master e1bc515 = dev-master e1bc515 Extends the Symfony routing component for dynamic routes and chaining several routers
symfony-cmf/routing-bundle               dev-master bf20a1f = dev-master bf20a1f Symfony RoutingBundle
symfony-cmf/tree-browser-bundle          dev-master 14ddf7d = dev-master 14ddf7d Symfony CMF Tree Browser Bundle
symfony/cache                            v4.0.4             = v4.0.4             Symfony Cache component with PSR-6, PSR-16, and tags

create DBs

mysql>
  create database testdb;
  create database testdb_phpcr;

init

bin/console doctrine:phpcr:init:dbal --force
bin/console doctrine:migrations:diff
bin/console doctrine:migrations:migrate --no-interaction

no errors

show

mysqlshow testdb
Database: testdb
+-----------------------+
|        Tables         |
+-----------------------+
| fos_user_group        |
| fos_user_user         |
| fos_user_user_group   |
| media__gallery        |
| media__gallery_media  |
| media__media          |
| migration_versions    |
| notification__message |
| page__block           |
| page__page            |
| page__site            |
| page__snapshot        |
+-----------------------+

mysqlshow testdb_phpcr
Database: testdb_phpcr
+----------------------------+
|           Tables           |
+----------------------------+
| phpcr_binarydata           |
| phpcr_internal_index_types |
| phpcr_namespaces           |
| phpcr_nodes                |
| phpcr_nodes_references     |
| phpcr_nodes_weakreferences |
| phpcr_type_childs          |
| phpcr_type_nodes           |
| phpcr_type_props           |
| phpcr_workspaces           |
+----------------------------+

schema:validate fails

bin/console doctrine:schema:validate

    Mapping
    -------
     [OK] The mapping files are correct.

    Database
    --------
     [ERROR] The database schema is not in sync with the current mapping file.

dev.log

logphp.INFO: User Deprecated: The Knp\Bundle\MenuBundle\EventListener\VoterInitializerListener class is deprecated since 2.2 and will be removed in 3.0. {"exception":"[object] (ErrorException(code: 0): User Deprecated: The Knp\\Bundle\\MenuBundle\\EventListener\\VoterInitializerListener class is deprecated since 2.2 and will be removed in 3.0. at /opt/evals/symfony4/vendor/knplabs/knp-menu-bundle/src/EventListener/VoterInitializerListener.php:5)"} []
php.INFO: User Deprecated: The Sonata\CacheBundle\Invalidation\SimpleCacheInvalidation class is deprecated since version 2.4 and will be removed in 3.0. Use Sonata\Cache\Invalidation\SimpleCacheInvalidation instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: The Sonata\\CacheBundle\\Invalidation\\SimpleCacheInvalidation class is deprecated since version 2.4 and will be removed in 3.0. Use Sonata\\Cache\\Invalidation\\SimpleCacheInvalidation instead. at /opt/evals/symfony4/vendor/sonata-project/cache-bundle/src/Invalidation/SimpleCacheInvalidation.php:17)"} []
doctrine.DEBUG: SHOW FULL TABLES WHERE Table_type = 'BASE TABLE' [] []
doctrine.DEBUG: SELECT COLUMN_NAME AS Field, COLUMN_TYPE AS Type, IS_NULLABLE AS `Null`, COLUMN_KEY AS `Key`, COLUMN_DEFAULT AS `Default`, EXTRA AS Extra, COLUMN_COMMENT AS Comment, CHARACTER_SET_NAME AS CharacterSet, COLLATION_NAME AS Collation FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'testdb' AND TABLE_NAME = 'fos_user_group' [] []
doctrine.DEBUG: SELECT DISTINCT k.`CONSTRAINT_NAME`, k.`COLUMN_NAME`, k.`REFERENCED_TABLE_NAME`, k.`REFERENCED_COLUMN_NAME` /*!50116 , c.update_rule, c.delete_rule */ FROM information_schema.key_column_usage k /*!50116 INNER JOIN information_schema.referential_constraints c ON   c.constraint_name = k.constraint_name AND   c.table_name = 'fos_user_group' */ WHERE k.table_name = 'fos_user_group' AND k.table_schema = 'testdb' /*!50116 AND c.constraint_schema = 'testdb' */ AND k.`REFERENCED_COLUMN_NAME` is not NULL [] []
doctrine.DEBUG: SELECT TABLE_NAME AS `Table`, NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, SEQ_IN_INDEX AS Seq_in_index, COLUMN_NAME AS Column_Name, COLLATION AS Collation, CARDINALITY AS Cardinality, SUB_PART AS Sub_Part, PACKED AS Packed, NULLABLE AS `Null`, INDEX_TYPE AS Index_Type, COMMENT AS Comment FROM information_schema.STATISTICS WHERE TABLE_NAME = 'fos_user_group' AND TABLE_SCHEMA = 'testdb' [] []
doctrine.DEBUG: SELECT COLUMN_NAME AS Field, COLUMN_TYPE AS Type, IS_NULLABLE AS `Null`, COLUMN_KEY AS `Key`, COLUMN_DEFAULT AS `Default`, EXTRA AS Extra, COLUMN_COMMENT AS Comment, CHARACTER_SET_NAME AS CharacterSet, COLLATION_NAME AS Collation FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'testdb' AND TABLE_NAME = 'fos_user_user' [] []
doctrine.DEBUG: SELECT DISTINCT k.`CONSTRAINT_NAME`, k.`COLUMN_NAME`, k.`REFERENCED_TABLE_NAME`, k.`REFERENCED_COLUMN_NAME` /*!50116 , c.update_rule, c.delete_rule */ FROM information_schema.key_column_usage k /*!50116 INNER JOIN information_schema.referential_constraints c ON   c.constraint_name = k.constraint_name AND   c.table_name = 'fos_user_user' */ WHERE k.table_name = 'fos_user_user' AND k.table_schema = 'testdb' /*!50116 AND c.constraint_schema = 'testdb' */ AND k.`REFERENCED_COLUMN_NAME` is not NULL [] []
doctrine.DEBUG: SELECT TABLE_NAME AS `Table`, NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, SEQ_IN_INDEX AS Seq_in_index, COLUMN_NAME AS Column_Name, COLLATION AS Collation, CARDINALITY AS Cardinality, SUB_PART AS Sub_Part, PACKED AS Packed, NULLABLE AS `Null`, INDEX_TYPE AS Index_Type, COMMENT AS Comment FROM information_schema.STATISTICS WHERE TABLE_NAME = 'fos_user_user' AND TABLE_SCHEMA = 'testdb' [] []
doctrine.DEBUG: SELECT COLUMN_NAME AS Field, COLUMN_TYPE AS Type, IS_NULLABLE AS `Null`, COLUMN_KEY AS `Key`, COLUMN_DEFAULT AS `Default`, EXTRA AS Extra, COLUMN_COMMENT AS Comment, CHARACTER_SET_NAME AS CharacterSet, COLLATION_NAME AS Collation FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'testdb' AND TABLE_NAME = 'fos_user_user_group' [] []
doctrine.DEBUG: SELECT DISTINCT k.`CONSTRAINT_NAME`, k.`COLUMN_NAME`, k.`REFERENCED_TABLE_NAME`, k.`REFERENCED_COLUMN_NAME` /*!50116 , c.update_rule, c.delete_rule */ FROM information_schema.key_column_usage k /*!50116 INNER JOIN information_schema.referential_constraints c ON   c.constraint_name = k.constraint_name AND   c.table_name = 'fos_user_user_group' */ WHERE k.table_name = 'fos_user_user_group' AND k.table_schema = 'testdb' /*!50116 AND c.constraint_schema = 'testdb' */ AND k.`REFERENCED_COLUMN_NAME` is not NULL [] []
doctrine.DEBUG: SELECT TABLE_NAME AS `Table`, NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, SEQ_IN_INDEX AS Seq_in_index, COLUMN_NAME AS Column_Name, COLLATION AS Collation, CARDINALITY AS Cardinality, SUB_PART AS Sub_Part, PACKED AS Packed, NULLABLE AS `Null`, INDEX_TYPE AS Index_Type, COMMENT AS Comment FROM information_schema.STATISTICS WHERE TABLE_NAME = 'fos_user_user_group' AND TABLE_SCHEMA = 'testdb' [] []
doctrine.DEBUG: SELECT COLUMN_NAME AS Field, COLUMN_TYPE AS Type, IS_NULLABLE AS `Null`, COLUMN_KEY AS `Key`, COLUMN_DEFAULT AS `Default`, EXTRA AS Extra, COLUMN_COMMENT AS Comment, CHARACTER_SET_NAME AS CharacterSet, COLLATION_NAME AS Collation FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'testdb' AND TABLE_NAME = 'media__gallery' [] []
doctrine.DEBUG: SELECT DISTINCT k.`CONSTRAINT_NAME`, k.`COLUMN_NAME`, k.`REFERENCED_TABLE_NAME`, k.`REFERENCED_COLUMN_NAME` /*!50116 , c.update_rule, c.delete_rule */ FROM information_schema.key_column_usage k /*!50116 INNER JOIN information_schema.referential_constraints c ON   c.constraint_name = k.constraint_name AND   c.table_name = 'media__gallery' */ WHERE k.table_name = 'media__gallery' AND k.table_schema = 'testdb' /*!50116 AND c.constraint_schema = 'testdb' */ AND k.`REFERENCED_COLUMN_NAME` is not NULL [] []
doctrine.DEBUG: SELECT TABLE_NAME AS `Table`, NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, SEQ_IN_INDEX AS Seq_in_index, COLUMN_NAME AS Column_Name, COLLATION AS Collation, CARDINALITY AS Cardinality, SUB_PART AS Sub_Part, PACKED AS Packed, NULLABLE AS `Null`, INDEX_TYPE AS Index_Type, COMMENT AS Comment FROM information_schema.STATISTICS WHERE TABLE_NAME = 'media__gallery' AND TABLE_SCHEMA = 'testdb' [] []
doctrine.DEBUG: SELECT COLUMN_NAME AS Field, COLUMN_TYPE AS Type, IS_NULLABLE AS `Null`, COLUMN_KEY AS `Key`, COLUMN_DEFAULT AS `Default`, EXTRA AS Extra, COLUMN_COMMENT AS Comment, CHARACTER_SET_NAME AS CharacterSet, COLLATION_NAME AS Collation FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'testdb' AND TABLE_NAME = 'media__gallery_media' [] []
doctrine.DEBUG: SELECT DISTINCT k.`CONSTRAINT_NAME`, k.`COLUMN_NAME`, k.`REFERENCED_TABLE_NAME`, k.`REFERENCED_COLUMN_NAME` /*!50116 , c.update_rule, c.delete_rule */ FROM information_schema.key_column_usage k /*!50116 INNER JOIN information_schema.referential_constraints c ON   c.constraint_name = k.constraint_name AND   c.table_name = 'media__gallery_media' */ WHERE k.table_name = 'media__gallery_media' AND k.table_schema = 'testdb' /*!50116 AND c.constraint_schema = 'testdb' */ AND k.`REFERENCED_COLUMN_NAME` is not NULL [] []
doctrine.DEBUG: SELECT TABLE_NAME AS `Table`, NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, SEQ_IN_INDEX AS Seq_in_index, COLUMN_NAME AS Column_Name, COLLATION AS Collation, CARDINALITY AS Cardinality, SUB_PART AS Sub_Part, PACKED AS Packed, NULLABLE AS `Null`, INDEX_TYPE AS Index_Type, COMMENT AS Comment FROM information_schema.STATISTICS WHERE TABLE_NAME = 'media__gallery_media' AND TABLE_SCHEMA = 'testdb' [] []
doctrine.DEBUG: SELECT COLUMN_NAME AS Field, COLUMN_TYPE AS Type, IS_NULLABLE AS `Null`, COLUMN_KEY AS `Key`, COLUMN_DEFAULT AS `Default`, EXTRA AS Extra, COLUMN_COMMENT AS Comment, CHARACTER_SET_NAME AS CharacterSet, COLLATION_NAME AS Collation FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'testdb' AND TABLE_NAME = 'media__media' [] []
doctrine.DEBUG: SELECT DISTINCT k.`CONSTRAINT_NAME`, k.`COLUMN_NAME`, k.`REFERENCED_TABLE_NAME`, k.`REFERENCED_COLUMN_NAME` /*!50116 , c.update_rule, c.delete_rule */ FROM information_schema.key_column_usage k /*!50116 INNER JOIN information_schema.referential_constraints c ON   c.constraint_name = k.constraint_name AND   c.table_name = 'media__media' */ WHERE k.table_name = 'media__media' AND k.table_schema = 'testdb' /*!50116 AND c.constraint_schema = 'testdb' */ AND k.`REFERENCED_COLUMN_NAME` is not NULL [] []
doctrine.DEBUG: SELECT TABLE_NAME AS `Table`, NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, SEQ_IN_INDEX AS Seq_in_index, COLUMN_NAME AS Column_Name, COLLATION AS Collation, CARDINALITY AS Cardinality, SUB_PART AS Sub_Part, PACKED AS Packed, NULLABLE AS `Null`, INDEX_TYPE AS Index_Type, COMMENT AS Comment FROM information_schema.STATISTICS WHERE TABLE_NAME = 'media__media' AND TABLE_SCHEMA = 'testdb' [] []
doctrine.DEBUG: SELECT COLUMN_NAME AS Field, COLUMN_TYPE AS Type, IS_NULLABLE AS `Null`, COLUMN_KEY AS `Key`, COLUMN_DEFAULT AS `Default`, EXTRA AS Extra, COLUMN_COMMENT AS Comment, CHARACTER_SET_NAME AS CharacterSet, COLLATION_NAME AS Collation FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'testdb' AND TABLE_NAME = 'migration_versions' [] []
doctrine.DEBUG: SELECT DISTINCT k.`CONSTRAINT_NAME`, k.`COLUMN_NAME`, k.`REFERENCED_TABLE_NAME`, k.`REFERENCED_COLUMN_NAME` /*!50116 , c.update_rule, c.delete_rule */ FROM information_schema.key_column_usage k /*!50116 INNER JOIN information_schema.referential_constraints c ON   c.constraint_name = k.constraint_name AND   c.table_name = 'migration_versions' */ WHERE k.table_name = 'migration_versions' AND k.table_schema = 'testdb' /*!50116 AND c.constraint_schema = 'testdb' */ AND k.`REFERENCED_COLUMN_NAME` is not NULL [] []
doctrine.DEBUG: SELECT TABLE_NAME AS `Table`, NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, SEQ_IN_INDEX AS Seq_in_index, COLUMN_NAME AS Column_Name, COLLATION AS Collation, CARDINALITY AS Cardinality, SUB_PART AS Sub_Part, PACKED AS Packed, NULLABLE AS `Null`, INDEX_TYPE AS Index_Type, COMMENT AS Comment FROM information_schema.STATISTICS WHERE TABLE_NAME = 'migration_versions' AND TABLE_SCHEMA = 'testdb' [] []
doctrine.DEBUG: SELECT COLUMN_NAME AS Field, COLUMN_TYPE AS Type, IS_NULLABLE AS `Null`, COLUMN_KEY AS `Key`, COLUMN_DEFAULT AS `Default`, EXTRA AS Extra, COLUMN_COMMENT AS Comment, CHARACTER_SET_NAME AS CharacterSet, COLLATION_NAME AS Collation FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'testdb' AND TABLE_NAME = 'notification__message' [] []
doctrine.DEBUG: SELECT DISTINCT k.`CONSTRAINT_NAME`, k.`COLUMN_NAME`, k.`REFERENCED_TABLE_NAME`, k.`REFERENCED_COLUMN_NAME` /*!50116 , c.update_rule, c.delete_rule */ FROM information_schema.key_column_usage k /*!50116 INNER JOIN information_schema.referential_constraints c ON   c.constraint_name = k.constraint_name AND   c.table_name = 'notification__message' */ WHERE k.table_name = 'notification__message' AND k.table_schema = 'testdb' /*!50116 AND c.constraint_schema = 'testdb' */ AND k.`REFERENCED_COLUMN_NAME` is not NULL [] []
doctrine.DEBUG: SELECT TABLE_NAME AS `Table`, NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, SEQ_IN_INDEX AS Seq_in_index, COLUMN_NAME AS Column_Name, COLLATION AS Collation, CARDINALITY AS Cardinality, SUB_PART AS Sub_Part, PACKED AS Packed, NULLABLE AS `Null`, INDEX_TYPE AS Index_Type, COMMENT AS Comment FROM information_schema.STATISTICS WHERE TABLE_NAME = 'notification__message' AND TABLE_SCHEMA = 'testdb' [] []
doctrine.DEBUG: SELECT COLUMN_NAME AS Field, COLUMN_TYPE AS Type, IS_NULLABLE AS `Null`, COLUMN_KEY AS `Key`, COLUMN_DEFAULT AS `Default`, EXTRA AS Extra, COLUMN_COMMENT AS Comment, CHARACTER_SET_NAME AS CharacterSet, COLLATION_NAME AS Collation FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'testdb' AND TABLE_NAME = 'page__block' [] []
doctrine.DEBUG: SELECT DISTINCT k.`CONSTRAINT_NAME`, k.`COLUMN_NAME`, k.`REFERENCED_TABLE_NAME`, k.`REFERENCED_COLUMN_NAME` /*!50116 , c.update_rule, c.delete_rule */ FROM information_schema.key_column_usage k /*!50116 INNER JOIN information_schema.referential_constraints c ON   c.constraint_name = k.constraint_name AND   c.table_name = 'page__block' */ WHERE k.table_name = 'page__block' AND k.table_schema = 'testdb' /*!50116 AND c.constraint_schema = 'testdb' */ AND k.`REFERENCED_COLUMN_NAME` is not NULL [] []
doctrine.DEBUG: SELECT TABLE_NAME AS `Table`, NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, SEQ_IN_INDEX AS Seq_in_index, COLUMN_NAME AS Column_Name, COLLATION AS Collation, CARDINALITY AS Cardinality, SUB_PART AS Sub_Part, PACKED AS Packed, NULLABLE AS `Null`, INDEX_TYPE AS Index_Type, COMMENT AS Comment FROM information_schema.STATISTICS WHERE TABLE_NAME = 'page__block' AND TABLE_SCHEMA = 'testdb' [] []
doctrine.DEBUG: SELECT COLUMN_NAME AS Field, COLUMN_TYPE AS Type, IS_NULLABLE AS `Null`, COLUMN_KEY AS `Key`, COLUMN_DEFAULT AS `Default`, EXTRA AS Extra, COLUMN_COMMENT AS Comment, CHARACTER_SET_NAME AS CharacterSet, COLLATION_NAME AS Collation FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'testdb' AND TABLE_NAME = 'page__page' [] []
doctrine.DEBUG: SELECT DISTINCT k.`CONSTRAINT_NAME`, k.`COLUMN_NAME`, k.`REFERENCED_TABLE_NAME`, k.`REFERENCED_COLUMN_NAME` /*!50116 , c.update_rule, c.delete_rule */ FROM information_schema.key_column_usage k /*!50116 INNER JOIN information_schema.referential_constraints c ON   c.constraint_name = k.constraint_name AND   c.table_name = 'page__page' */ WHERE k.table_name = 'page__page' AND k.table_schema = 'testdb' /*!50116 AND c.constraint_schema = 'testdb' */ AND k.`REFERENCED_COLUMN_NAME` is not NULL [] []
doctrine.DEBUG: SELECT TABLE_NAME AS `Table`, NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, SEQ_IN_INDEX AS Seq_in_index, COLUMN_NAME AS Column_Name, COLLATION AS Collation, CARDINALITY AS Cardinality, SUB_PART AS Sub_Part, PACKED AS Packed, NULLABLE AS `Null`, INDEX_TYPE AS Index_Type, COMMENT AS Comment FROM information_schema.STATISTICS WHERE TABLE_NAME = 'page__page' AND TABLE_SCHEMA = 'testdb' [] []
doctrine.DEBUG: SELECT COLUMN_NAME AS Field, COLUMN_TYPE AS Type, IS_NULLABLE AS `Null`, COLUMN_KEY AS `Key`, COLUMN_DEFAULT AS `Default`, EXTRA AS Extra, COLUMN_COMMENT AS Comment, CHARACTER_SET_NAME AS CharacterSet, COLLATION_NAME AS Collation FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'testdb' AND TABLE_NAME = 'page__site' [] []
doctrine.DEBUG: SELECT DISTINCT k.`CONSTRAINT_NAME`, k.`COLUMN_NAME`, k.`REFERENCED_TABLE_NAME`, k.`REFERENCED_COLUMN_NAME` /*!50116 , c.update_rule, c.delete_rule */ FROM information_schema.key_column_usage k /*!50116 INNER JOIN information_schema.referential_constraints c ON   c.constraint_name = k.constraint_name AND   c.table_name = 'page__site' */ WHERE k.table_name = 'page__site' AND k.table_schema = 'testdb' /*!50116 AND c.constraint_schema = 'testdb' */ AND k.`REFERENCED_COLUMN_NAME` is not NULL [] []
doctrine.DEBUG: SELECT TABLE_NAME AS `Table`, NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, SEQ_IN_INDEX AS Seq_in_index, COLUMN_NAME AS Column_Name, COLLATION AS Collation, CARDINALITY AS Cardinality, SUB_PART AS Sub_Part, PACKED AS Packed, NULLABLE AS `Null`, INDEX_TYPE AS Index_Type, COMMENT AS Comment FROM information_schema.STATISTICS WHERE TABLE_NAME = 'page__site' AND TABLE_SCHEMA = 'testdb' [] []
doctrine.DEBUG: SELECT COLUMN_NAME AS Field, COLUMN_TYPE AS Type, IS_NULLABLE AS `Null`, COLUMN_KEY AS `Key`, COLUMN_DEFAULT AS `Default`, EXTRA AS Extra, COLUMN_COMMENT AS Comment, CHARACTER_SET_NAME AS CharacterSet, COLLATION_NAME AS Collation FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'testdb' AND TABLE_NAME = 'page__snapshot' [] []
doctrine.DEBUG: SELECT DISTINCT k.`CONSTRAINT_NAME`, k.`COLUMN_NAME`, k.`REFERENCED_TABLE_NAME`, k.`REFERENCED_COLUMN_NAME` /*!50116 , c.update_rule, c.delete_rule */ FROM information_schema.key_column_usage k /*!50116 INNER JOIN information_schema.referential_constraints c ON   c.constraint_name = k.constraint_name AND   c.table_name = 'page__snapshot' */ WHERE k.table_name = 'page__snapshot' AND k.table_schema = 'testdb' /*!50116 AND c.constraint_schema = 'testdb' */ AND k.`REFERENCED_COLUMN_NAME` is not NULL [] []
doctrine.DEBUG: SELECT TABLE_NAME AS `Table`, NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, SEQ_IN_INDEX AS Seq_in_index, COLUMN_NAME AS Column_Name, COLLATION AS Collation, CARDINALITY AS Cardinality, SUB_PART AS Sub_Part, PACKED AS Packed, NULLABLE AS `Null`, INDEX_TYPE AS Index_Type, COMMENT AS Comment FROM information_schema.STATISTICS WHERE TABLE_NAME = 'page__snapshot' AND TABLE_SCHEMA = 'testdb' [] []
console.DEBUG: Command "doctrine:schema:validate" exited with code "2" {"command":"doctrine:schema:validate","code":2} []
xabbuh commented 6 years ago

Maybe you migrations just do not fully reflect the state of your mapping configuration. What is the output of the doctrine:schema:update --dump-sql command?

ob1201 commented 6 years ago

@xabbuh

bin/console doctrine:schema:update --dump-sql

 The following SQL statements will be executed:

     ALTER TABLE fos_user_user CHANGE salt salt VARCHAR(255) DEFAULT NULL, CHANGE last_login last_login DATETIME DEFAULT NULL, CHANGE confirmation_token confirmation_token VARCHAR(180) DEFAULT NULL, CHANGE password_requested_at password_requested_at DATETIME DEFAULT NULL, CHANGE date_of_birth date_of_birth DATETIME DEFAULT NULL, CHANGE firstname firstname VARCHAR(64) DEFAULT NULL, CHANGE lastname lastname VARCHAR(64) DEFAULT NULL, CHANGE website website VARCHAR(64) DEFAULT NULL, CHANGE biography biography VARCHAR(1000) DEFAULT NULL, CHANGE gender gender VARCHAR(1) DEFAULT NULL, CHANGE locale locale VARCHAR(8) DEFAULT NULL, CHANGE timezone timezone VARCHAR(64) DEFAULT NULL, CHANGE phone phone VARCHAR(64) DEFAULT NULL, CHANGE facebook_uid facebook_uid VARCHAR(255) DEFAULT NULL, CHANGE facebook_name facebook_name VARCHAR(255) DEFAULT NULL, CHANGE facebook_data facebook_data LONGTEXT DEFAULT NULL COMMENT '(DC2Type:json)', CHANGE twitter_uid twitter_uid VARCHAR(255) DEFAULT NULL, CHANGE twitter_name twitter_name VARCHAR(255) DEFAULT NULL, CHANGE twitter_data twitter_data LONGTEXT DEFAULT NULL COMMENT '(DC2Type:json)', CHANGE gplus_uid gplus_uid VARCHAR(255) DEFAULT NULL, CHANGE gplus_name gplus_name VARCHAR(255) DEFAULT NULL, CHANGE gplus_data gplus_data LONGTEXT DEFAULT NULL COMMENT '(DC2Type:json)', CHANGE token token VARCHAR(255) DEFAULT NULL, CHANGE two_step_code two_step_code VARCHAR(255) DEFAULT NULL;
     ALTER TABLE page__block CHANGE parent_id parent_id INT DEFAULT NULL, CHANGE page_id page_id INT DEFAULT NULL, CHANGE name name VARCHAR(255) DEFAULT NULL, CHANGE enabled enabled TINYINT(1) DEFAULT NULL, CHANGE position position INT DEFAULT NULL;
     ALTER TABLE page__snapshot CHANGE site_id site_id INT DEFAULT NULL, CHANGE page_id page_id INT DEFAULT NULL, CHANGE page_alias page_alias VARCHAR(255) DEFAULT NULL, CHANGE type type VARCHAR(255) DEFAULT NULL, CHANGE parent_id parent_id INT DEFAULT NULL, CHANGE target_id target_id INT DEFAULT NULL, CHANGE content content LONGTEXT DEFAULT NULL COMMENT '(DC2Type:json)', CHANGE publication_date_start publication_date_start DATETIME DEFAULT NULL, CHANGE publication_date_end publication_date_end DATETIME DEFAULT NULL;
     ALTER TABLE page__page CHANGE site_id site_id INT DEFAULT NULL, CHANGE parent_id parent_id INT DEFAULT NULL, CHANGE target_id target_id INT DEFAULT NULL, CHANGE page_alias page_alias VARCHAR(255) DEFAULT NULL, CHANGE type type VARCHAR(255) DEFAULT NULL, CHANGE request_method request_method VARCHAR(255) DEFAULT NULL, CHANGE title title VARCHAR(255) DEFAULT NULL, CHANGE meta_keyword meta_keyword VARCHAR(255) DEFAULT NULL, CHANGE meta_description meta_description VARCHAR(255) DEFAULT NULL;
     ALTER TABLE page__site CHANGE relative_path relative_path VARCHAR(255) DEFAULT NULL, CHANGE enabled_from enabled_from DATETIME DEFAULT NULL, CHANGE enabled_to enabled_to DATETIME DEFAULT NULL, CHANGE locale locale VARCHAR(7) DEFAULT NULL, CHANGE title title VARCHAR(64) DEFAULT NULL, CHANGE meta_keywords meta_keywords VARCHAR(255) DEFAULT NULL, CHANGE meta_description meta_description VARCHAR(255) DEFAULT NULL;
     ALTER TABLE notification__message CHANGE restart_count restart_count INT DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE started_at started_at DATETIME DEFAULT NULL, CHANGE completed_at completed_at DATETIME DEFAULT NULL;
     ALTER TABLE media__gallery_media CHANGE gallery_id gallery_id INT DEFAULT NULL, CHANGE media_id media_id INT DEFAULT NULL;
     ALTER TABLE media__media CHANGE provider_metadata provider_metadata LONGTEXT DEFAULT NULL COMMENT '(DC2Type:json)', CHANGE width width INT DEFAULT NULL, CHANGE height height INT DEFAULT NULL, CHANGE length length NUMERIC(10, 0) DEFAULT NULL, CHANGE content_type content_type VARCHAR(255) DEFAULT NULL, CHANGE content_size content_size INT DEFAULT NULL, CHANGE copyright copyright VARCHAR(255) DEFAULT NULL, CHANGE author_name author_name VARCHAR(255) DEFAULT NULL, CHANGE context context VARCHAR(64) DEFAULT NULL, CHANGE cdn_is_flushable cdn_is_flushable TINYINT(1) DEFAULT NULL, CHANGE cdn_flush_identifier cdn_flush_identifier VARCHAR(64) DEFAULT NULL, CHANGE cdn_flush_at cdn_flush_at DATETIME DEFAULT NULL, CHANGE cdn_status cdn_status INT DEFAULT NULL;

bin/console doctrine:schema:update --force

 Updating database schema...

     8 queries were executed

 [OK] Database schema updated successfully!                                                  

bin/console doctrine:schema:update --dump-sql

 The following SQL statements will be executed:

     ALTER TABLE fos_user_user CHANGE salt salt VARCHAR(255) DEFAULT NULL, CHANGE last_login last_login DATETIME DEFAULT NULL, CHANGE confirmation_token confirmation_token VARCHAR(180) DEFAULT NULL, CHANGE password_requested_at password_requested_at DATETIME DEFAULT NULL, CHANGE date_of_birth date_of_birth DATETIME DEFAULT NULL, CHANGE firstname firstname VARCHAR(64) DEFAULT NULL, CHANGE lastname lastname VARCHAR(64) DEFAULT NULL, CHANGE website website VARCHAR(64) DEFAULT NULL, CHANGE biography biography VARCHAR(1000) DEFAULT NULL, CHANGE gender gender VARCHAR(1) DEFAULT NULL, CHANGE locale locale VARCHAR(8) DEFAULT NULL, CHANGE timezone timezone VARCHAR(64) DEFAULT NULL, CHANGE phone phone VARCHAR(64) DEFAULT NULL, CHANGE facebook_uid facebook_uid VARCHAR(255) DEFAULT NULL, CHANGE facebook_name facebook_name VARCHAR(255) DEFAULT NULL, CHANGE facebook_data facebook_data LONGTEXT DEFAULT NULL COMMENT '(DC2Type:json)', CHANGE twitter_uid twitter_uid VARCHAR(255) DEFAULT NULL, CHANGE twitter_name twitter_name VARCHAR(255) DEFAULT NULL, CHANGE twitter_data twitter_data LONGTEXT DEFAULT NULL COMMENT '(DC2Type:json)', CHANGE gplus_uid gplus_uid VARCHAR(255) DEFAULT NULL, CHANGE gplus_name gplus_name VARCHAR(255) DEFAULT NULL, CHANGE gplus_data gplus_data LONGTEXT DEFAULT NULL COMMENT '(DC2Type:json)', CHANGE token token VARCHAR(255) DEFAULT NULL, CHANGE two_step_code two_step_code VARCHAR(255) DEFAULT NULL;
     ALTER TABLE page__block CHANGE parent_id parent_id INT DEFAULT NULL, CHANGE page_id page_id INT DEFAULT NULL, CHANGE name name VARCHAR(255) DEFAULT NULL, CHANGE enabled enabled TINYINT(1) DEFAULT NULL, CHANGE position position INT DEFAULT NULL;
     ALTER TABLE page__snapshot CHANGE site_id site_id INT DEFAULT NULL, CHANGE page_id page_id INT DEFAULT NULL, CHANGE page_alias page_alias VARCHAR(255) DEFAULT NULL, CHANGE type type VARCHAR(255) DEFAULT NULL, CHANGE parent_id parent_id INT DEFAULT NULL, CHANGE target_id target_id INT DEFAULT NULL, CHANGE content content LONGTEXT DEFAULT NULL COMMENT '(DC2Type:json)', CHANGE publication_date_start publication_date_start DATETIME DEFAULT NULL, CHANGE publication_date_end publication_date_end DATETIME DEFAULT NULL;
     ALTER TABLE page__page CHANGE site_id site_id INT DEFAULT NULL, CHANGE parent_id parent_id INT DEFAULT NULL, CHANGE target_id target_id INT DEFAULT NULL, CHANGE page_alias page_alias VARCHAR(255) DEFAULT NULL, CHANGE type type VARCHAR(255) DEFAULT NULL, CHANGE request_method request_method VARCHAR(255) DEFAULT NULL, CHANGE title title VARCHAR(255) DEFAULT NULL, CHANGE meta_keyword meta_keyword VARCHAR(255) DEFAULT NULL, CHANGE meta_description meta_description VARCHAR(255) DEFAULT NULL;
     ALTER TABLE page__site CHANGE relative_path relative_path VARCHAR(255) DEFAULT NULL, CHANGE enabled_from enabled_from DATETIME DEFAULT NULL, CHANGE enabled_to enabled_to DATETIME DEFAULT NULL, CHANGE locale locale VARCHAR(7) DEFAULT NULL, CHANGE title title VARCHAR(64) DEFAULT NULL, CHANGE meta_keywords meta_keywords VARCHAR(255) DEFAULT NULL, CHANGE meta_description meta_description VARCHAR(255) DEFAULT NULL;
     ALTER TABLE notification__message CHANGE restart_count restart_count INT DEFAULT NULL, CHANGE updated_at updated_at DATETIME DEFAULT NULL, CHANGE started_at started_at DATETIME DEFAULT NULL, CHANGE completed_at completed_at DATETIME DEFAULT NULL;
     ALTER TABLE media__gallery_media CHANGE gallery_id gallery_id INT DEFAULT NULL, CHANGE media_id media_id INT DEFAULT NULL;
     ALTER TABLE media__media CHANGE provider_metadata provider_metadata LONGTEXT DEFAULT NULL COMMENT '(DC2Type:json)', CHANGE width width INT DEFAULT NULL, CHANGE height height INT DEFAULT NULL, CHANGE length length NUMERIC(10, 0) DEFAULT NULL, CHANGE content_type content_type VARCHAR(255) DEFAULT NULL, CHANGE content_size content_size INT DEFAULT NULL, CHANGE copyright copyright VARCHAR(255) DEFAULT NULL, CHANGE author_name author_name VARCHAR(255) DEFAULT NULL, CHANGE context context VARCHAR(64) DEFAULT NULL, CHANGE cdn_is_flushable cdn_is_flushable TINYINT(1) DEFAULT NULL, CHANGE cdn_flush_identifier cdn_flush_identifier VARCHAR(64) DEFAULT NULL, CHANGE cdn_flush_at cdn_flush_at DATETIME DEFAULT NULL, CHANGE cdn_status cdn_status INT DEFAULT NULL;
Ocramius commented 6 years ago

Most likely related: https://github.com/doctrine/dbal/pull/2825

ob1201 commented 6 years ago

@ocramius

thx

fwiw,

composer require doctrine/dbal:dev-master

does not fix the issue

Apparently not possible to continue to comment there either

Ocramius locked as resolved and limited conversation to collaborators on Jan 5

what add'l info needed, and where to add it?

allfreelancers commented 6 years ago

@Ocramius leave comment please

Ocramius commented 6 years ago

DB type and versions would help here. An isolated test case for the ORM test suite would be best

allfreelancers commented 6 years ago

@Ocramius 10.2.10-MariaDB

Ocramius commented 6 years ago

Yeah, so it won't work, as we don't support MariaDB 10 yet.

This will need https://github.com/doctrine/dbal/pull/2825 and maybe more tests around it.

kimhemsoe commented 6 years ago

Closing as this this does not sound like a doctrine bundle issue and should also be fixed by https://github.com/doctrine/dbal/pull/2825

na-ringtail commented 5 years ago

[SOLVED] Try to comment server version in doctrine.yaml

doctrine:
    dbal:
        # configure these for your database server
        driver: 'pdo_mysql'
        #server_version: '5.7' # Otherwise schema validation will fail
        charset: utf8mb4
        default_table_options:
            charset: utf8mb4
            collate: utf8mb4_unicode_ci

        url: '%env(resolve:DATABASE_URL)%'