Closed konradperlowski closed 3 weeks ago
Hey @konradperlowski, I think it might be due to this bug in Rails https://github.com/rails/rails/issues/52829. It's already been fixed, but perhaps you're on a previous version.
I tried this on rails 7.2.1
and 8.0.0.beta1
and it cleared queue_schema.rb
file
I think that change might not have been released in any of those. Could you try Rails edge instead?
It still happens on edge, but it works correctly with sqllite (not sure about previous rails versions) - it does not work with psql
Huh, that's really strange. This shouldn't depend on the DBMS you're using. Maybe add a comment to that original Rails issue?
No, my bad - it does not work with sqlite :sweat_smile:
Hey @konradperlowski, do you still have solid_queue
migrations in db/migrate
?
I had the same. Deleted all the solid_queue migrations and then run the commands and now i only get some formatting but the content stays in queue_schema.rb
Hey @konradperlowski, do you still have
solid_queue
migrations indb/migrate
?I had the same. Deleted all the solid_queue migrations and then run the commands and now i only get some formatting but the content stays in
queue_schema.rb
No, I don't have any solid queue related migrations in db/migrate
. I believe this pr will fix this issue, so I wait for this to be merged into rails main, then I will test this again and hopefully close this issue
FYI this still problem still exists on Rails 8.0.0@fa35b70a5f6863104856f25641026fc4d449b449
Using current rails main (after merging this pr) I cannot reproduce this issue anymore
The problem still exists with Ruby 3.3.4, Rails 8.0.0, and solid_queue 1.0.1 after running the command bin/rails db:migrate:reset
.
Am I missing something, or is it supposed to work this way?
Also, I’m wondering why this gem doesn’t use migrations, as other gems typically do with generators or install tasks. Would using migrations help prevent issues like this? Shouldn't the database schema be generated based on migrations? Why is a pre-defined schema being used instead?
Hi, I added solid queue configuration for my development environment and after running
rails db:migrate:reset
command (or manually runningdb:drop db:create db:migrate
) filequeue_schema.rb
is empty.I have following configurations:
database.yml
:development.rb
:When I run
db:drop
and thendb:prepare
it works fine.