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

Move install-db-schema from afterReset to beforeAllMigrations #178

Open
zacherkkila opened this issue Jun 29, 2020 · 1 comment
Open

Move install-db-schema from afterReset to beforeAllMigrations #178

zacherkkila opened this issue Jun 29, 2020 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@zacherkkila
Copy link

I believe this was handled by the wipe-if-demo script in the demo but I needed to manually run it in production since I removed that script from the Procfile. Not a huge deal but figured I would at least document it here to save someone else some time as it threw me for a little loop when I got the Postgres error.

Got the following error when I tried to register since the worker schema wasn't there

Registration failed (Error code: ERR_3F000)

Once I got the postgres logs running right on RDS it was fairly obvious, just had to run

yarn workspace @app/worker install-db-schema

and everything worked as intended

@benjie
Copy link
Member

benjie commented Jun 30, 2020

You raise a good point; we currently use afterReset to install the schema; but that'll only do it on the first version and won't install updates until the worker itself runs properly. We should instead use the beforeAllMigrations hook (which is newer than the configuration file, I think).

"command": "DATABASE_URL=\"${GM_DBURL}\" yarn workspace @app/worker install-db-schema"

PR welcome 👍

@benjie benjie changed the title Add worker 'install-db-schema' to Heroku setup template Move install-db-schema from afterReset to beforeAllMigrations Jun 30, 2020
@benjie benjie added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers and removed help wanted Extra attention is needed labels Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants