Skip to content

Schema is never in sync with Maria DB 10.2.8 #702

Closed
@Seikyo

Description

Hello,
it seems the schema:update is broken using MariaDB 10.2.8, i am currently unable to validate the database schema since a few days, every time I run doctrine:schema:update --force i get a Database schema updated successfully message but if I chain with a doctrine:schema:update --dump-sql there are still changes (it loops).

I could reproduce this on two symfony projects using:

doctrine/orm                         v2.5.11            Object-Relational-Mapper for PHP
symfony/symfony                      v3.3.9             The Symfony PHP framework

And

doctrine/orm                         v2.5.10 Object-Relational-Mapper for PHP
symfony/symfony                      v2.8.27 The Symfony PHP framework

Both using

doctrine/annotations                 v1.4.0  Docblock Annotations Parser
doctrine/cache                       v1.6.2  Caching library offering an object-oriented API for many cache backends
doctrine/dbal                        v2.5.13 Database Abstraction Layer
doctrine/doctrine-bundle             1.6.8   Symfony DoctrineBundle
doctrine/doctrine-cache-bundle       1.3.0   Symfony Bundle for Doctrine Cache
doctrine/lexer                       v1.0.1  Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.

And here are some outputs of what happen with a single user entity:

18:12 $ sf doctrine:schema:update --dump-sql --force
ALTER TABLE 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 firstname firstname VARCHAR(32) DEFAULT NULL, CHANGE lastname lastname VARCHAR(32) DEFAULT NULL;

Updating database schema...
Database schema updated successfully! "1" query was executed
✔ ~/bboutarel/symfony [clean|●1✚ 1…1] 
18:12 $ sf doctrine:schema:update --dump-sql --force
ALTER TABLE 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 firstname firstname VARCHAR(32) DEFAULT NULL, CHANGE lastname lastname VARCHAR(32) DEFAULT NULL;

Updating database schema...
Database schema updated successfully! "1" query was executed

Using MariaDB 10.2.8

18:14 $ mysql -v
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 30
Server version: 10.2.8-MariaDB Homebrew

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions