-
Notifications
You must be signed in to change notification settings - Fork 0
Database Migrations
Stephen Yeargin edited this page Oct 29, 2021
·
2 revisions
Unlike some platforms, Google App Engine Standard does not have the ability to run an arbitrary command on a given running instance (such as a database migration). The solution is to run migrations by passing in a configuration setting to the Doctrine script.
Use this this file to save the connection information in the same directory, removing the .dist
extension. Note that the naming of the file is relevant to how you define the target later in the process.
cloud_sql_proxy -dir=./ -instances=<instance name>:us-central1:<database name>tcp:<available port>
This should show that there is one or more pending migrations.
MIGRATION_TARGET=<target> bin/console doctrine:migrations:status --db-configuration=./dev_config/migrations-db.php
MIGRATION_TARGET=<target> bin/console doctrine:migrations:migrate --db-configuration=./dev_config/migrations-db.php