DarkmiraTour / community-event-manager

Web application with a collection of tools helping people organising community events such as multi-days conference with reminders, CRM and such
GNU General Public License v3.0
21 stars 22 forks source link

Add CI test to check whether migrations are up to date #160

Closed alcalyn closed 5 years ago

alcalyn commented 5 years ago

PR information

Q A
Branch? develop
Bug fix? yes
New feature? no
Tests pass? yes
Related issue nope

Description

Database schema is not synced with entities mapping.

This is because there is some options missing in migrations like nullable, missing indexes...

So This PR adds a new script in CI to check if after running migrations, schema is sync with entities mapping.

If the job fails, it displays the following result:

$ make check_migrations_updated
docker-compose exec php bin/console doctrine:schema:update --dump-sql | grep "Nothing to update"
make: *** [check_migrations_updated] Error 1
The command "make check_migrations_updated" exited with 2.
cache.2

Done. Your build exited with 1.

To test it