Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema is never in sync with Maria DB 10.2.8 #702

Closed
Seikyo opened this issue Sep 21, 2017 · 1 comment
Closed

Schema is never in sync with Maria DB 10.2.8 #702

Seikyo opened this issue Sep 21, 2017 · 1 comment

Comments

@Seikyo
Copy link

Seikyo commented Sep 21, 2017

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
@Seikyo
Copy link
Author

Seikyo commented Sep 29, 2017

issue is a doctrine/dbal level and being handled, i am closing this
doctrine/dbal#2825

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant