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

Broken upgrade to v3. #703

Closed
stas opened this issue Aug 15, 2022 · 3 comments
Closed

Broken upgrade to v3. #703

stas opened this issue Aug 15, 2022 · 3 comments

Comments

@stas
Copy link
Contributor

stas commented Aug 15, 2022

Hi there,
I'm upgrading good_job from v2 to v3 and it looks like the migration instructions are incomplete.

Running:

/app # bin/rails g good_job:update
        skip  db/migrate/20220815115425_create_good_jobs.rb
        skip  db/migrate/20220815115425_create_good_job_settings.rb

But then starting the queue:

/app # bundle exec good_job
[GoodJob] [375] GoodJob started scheduler with queues=* max_threads=5.
[GoodJob] Notifier subscribed with LISTEN
[GoodJob] Notifier unsubscribed with UNLISTEN
[GoodJob] Notifier errored: ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR:  relation "good_job_processes" does not exist
LINE 9:  WHERE a.attrelid = '"good_job_processes"'::regclass

I'll be adding manually the missing migrations, not sure though how this could have happened.

@bensheldon
Copy link
Owner

Hmmm. Did you upgrade through v2.99 and generate the migrations for v2.99?

I squash down the migrations every major release.

@stas
Copy link
Contributor Author

stas commented Aug 15, 2022

I did run the update and the only migration that was generated was:

db/migrate/20220815115425_create_good_job_settings.rb

Btw, manually bringing the missing migrations worked.

@bensheldon
Copy link
Owner

If you got the migration for settings, that would mean you ran the update generator for a 3.x version, rather than 2.99.

I'm glad that you were able to copy over the old migrations 👍

Repository owner moved this from Inbox to Done in GoodJob Backlog v2 Sep 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants