1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activestorage/test/database/setup.rb
2021-06-21 07:44:33 +09:00

10 lines
417 B
Ruby

# frozen_string_literal: true
require_relative "create_users_migration"
require_relative "create_groups_migration"
# Writing and reading roles are required for the "previewing on the writer DB" test
ActiveRecord::Base.connects_to(database: { writing: :primary, reading: :replica })
ActiveRecord::Base.connection.migration_context.migrate
ActiveStorageCreateUsers.migrate(:up)
ActiveStorageCreateGroups.migrate(:up)