Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

189
Views
migrating from rails 5 to rails 6

we are updating from rails 5 to rails 6. we are currently using the ar_octopus gem for database shrading.

Looks like the rails supports database shrading by default from rails 6.

I have updated the database.yml file like so

test:
  primary:
    adapter: postgresql
    database: test
    username: postgres
    password: root
    host: localhost
  main:
    adapter: postgresql
    user: postgres
    database: "<%= ENV['API_MAIN_DATABASE_NAME'] %>"
    host: "<%= ENV['API_DATABASE_HOST'] %>"
    password: "<%= ENV['API_DATABASE_PASSWORD'] %>"
    database_tasks: false
    replica: false
  prediction:
    adapter: postgresql
    user: postgres
    database: "<%= ENV['API_PREDICTION_DATABASE_NAME'] %>"
    host: "<%= ENV['API_DATABASE_HOST'] %>"
    password: "<%= ENV['API_DATABASE_PASSWORD'] %>"
    database_tasks: false
    replica: false
  onshore:
    adapter: postgresql
    user: postgres
    database: "<%= ENV['API_US_ONSHORE_DATABASE_NAME'] %>"
    host: "<%= ENV['API_DATABASE_HOST'] %>"
    password: "<%= ENV['API_DATABASE_PASSWORD'] %>"
    database_tasks: false
    replica: false

If i run RAILS_ENV=test rails db:migrate looks like it still tries to run migration on all the databases.

database_tasks: false does not seem to work as intended.

may be i am missing something, is it not available in rails 6?

do i need to be on rails 7 for this to be available?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

database_tasks: false does not seem to work as intended. may be i am missing something, is it not available in rails 6? do i need to be on rails 7 for this to be available?

Yes, the database_tasks: option was added in 7.0 by https://github.com/rails/rails/pull/42794

  • https://github.com/rails/rails/blob/7-0-stable/activerecord/CHANGELOG.md
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!