-
Notifications
You must be signed in to change notification settings - Fork 157
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
Setting schema_format to sql prevents queue migration #525
Comments
Hey @longthanhtran, you don't need to use |
@rosa i am having this issue too, it doesn't generate queue migrations, if i run db:migrate or prepare, this only clears the queue schema. |
Hey @glundgrenm, migrations aren't supposed to be generated. The queue schema clearing... that sounds like a bug in Rails, though. |
@rosa cool, but how am i suppose to handle this? |
Could you test this from scratch? Run |
Running on Rails 8.0.1. Here it is:
the db/queue_schema.rb:
just ran bin/rails db:prepare, it ran without any mesage, but the development_queue.sqlite3 doesnt seems to have the tables from schema. |
But did this empty your Could you also copy your config.solid_queue.connects_to = { database: { writing: :queue } } |
No, it didnt emptied. Actually the application is running in development (i am not using any queue, actually) and production well. I started having issues when deploying it with kamal to the staging env (that also have the config.solid_queue.connects_to = { database: { writing: :queue } } in staging environment as in production). Whats happening only on the staging environment is that the app keeps restarting, saying:
Here is the database.yml, see that it kind of asks for migrations (migrations_paths: db/queue_migrate):
If you need we can have a call. |
Ahhh! You need to run |
that's the point hehe kamal is running it from a file called docker-entrypoint, that is called from the Dockerfile:
It seems that its not created because the file was empty, i will try it with the schema filled. Did not worked. Same error. I will try in a clean VM. |
Are you running solid queue in that same container? Or just the server? You have this condition:
|
@rosa it worked on a clean VM and with the schema file "filled". Let me sum up with i think is wrong with the "solid" pack. I believe the main bug is that the db:migrate is somehow emptying the schema for solid_cable, solid_queue and solid_cache. maybe if the bug is addressed or even better, a helper to generate the migrations (it is more clear to see whats going on). |
Ahh, great to know!
Huh, this shouldn't be the case, and it used to be a bug in Rails that got supposedly fixed 🤔 Are you using Rails 8? I wonder if that's the problem... if you're on Rails 8, this might have been a regression. |
rails 8.0.1. thank you very much for the help rosa! |
Thank you! This is the original bug I was thinking about: rails/rails#52829. In theory, it should be fixed in 8.0.1 😕 |
When I use rails 8 and want to use solid_queue, I think one setting of
config.active_record.schema_format
in config/application.rbcauses queue schema could not be created via
bin/rails db:migrate:queue
.All the steps I use was following the RoR guides
The text was updated successfully, but these errors were encountered: