-
Notifications
You must be signed in to change notification settings - Fork 158
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
Everytime I run db:migrate, db/queue_schema.rb is emptied, and tables don't exist (rails 8.0.3) #540
Comments
Hey @rathboma, you don't have to run |
Hey Rosa! If I run db:prepare, I get the same error, although the db/queue_schema.rb isn't deleted. |
Hmm... that's weird! Have you followed the instructions to set up solid queue in development? 🤔 |
Yes! I had it enabled for production, then updated my code to add it in for development last week, now I can get it working by wiping my database, restoring the queue_schema file, then running prepare, but otherwise it refuses to set it up right. My code looks like this: development:
primary:
adapter: postgresql
database: fuego_development
pool: 5
timeout: 5000
host: localhost
username: postgres
port: 5556
password: example
queue:
adapter: postgresql
database: fuego_development_queue
migrations_paths: db/queue_migrate
pool: 5
timeout: 5000
host: localhost
username: postgres
port: 5556
password: example # development.rb
config.active_job.queue_adapter = :solid_queue
config.solid_queue.connects_to = { database: { writing: :queue } }
config.solid_queue.logger = ActiveSupport::Logger.new(STDOUT) There's nothing in the queue database: |
Hey @rathboma, no, that's correct. The Could you check the contents of your |
Did some debugging, seems maybe this is because I ended up with a blank queue_schema.rb, then ran db:prepare which created an empty Can you explain the migrate vs prepare thing? Can I not run db:migrate anymore for fear of it wiping my queue_schema? |
No, |
So the problem was:
I must have run a stray command somewhere to do this. This makes db:prepare do nothing (oh the database exists, I'm all good) Now when I drop the queue database, both migrate and prepare work correctly. |
I ran into the same issue. In my case, I merged in some code from another branch where there was a migration. I cleaned up the conflicts and ran |
Hey team,
I started using solid_queue in development, but I'm continually running into a problem moving between computers.
Whenever I move from my laptop to my desktop and run
db:migrate
, I seem to be missing one solid_queue table or another, and the db/queue_schema.rb is emptied.Example error from this morning:
I've seen many issues that supposedly deal with this, but none of them seem to work for me. I really don't know why it is behaving this way -- I would expect it to have migration files, but it doesn't seem to?
The text was updated successfully, but these errors were encountered: