Fix behavior of database schema loading with SKIP_POST_DEPLOYMENT_MIGRATIONS
(#34089)
This commit is contained in:
parent
2bf5aee469
commit
04492e7f93
4 changed files with 62 additions and 11 deletions
|
@ -1,5 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative '../mastodon/database'
|
||||
require_relative '../mastodon/snowflake'
|
||||
|
||||
module ActiveRecord
|
||||
|
@ -8,6 +9,8 @@ module ActiveRecord
|
|||
original_load_schema = instance_method(:load_schema)
|
||||
|
||||
define_method(:load_schema) do |db_config, *args|
|
||||
Mastodon::Database.add_post_migrate_path_to_rails(force: true)
|
||||
|
||||
ActiveRecord::Base.establish_connection(db_config)
|
||||
Mastodon::Snowflake.define_timestamp_id
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue