Skip to content
Snippets Groups Projects
Commit cbc2e6bd authored by ThibG's avatar ThibG Committed by Eugen Rochko
Browse files

Make some migration script more robust (fixes #8007) (#8170)

Include a dummy Account class in the migration script containing only the
attributes relevant to the migration in order to not rely as much on the
codebase being in sync with the database schema.
parent 44680c46
No related branches found
No related tags found
No related merge requests found
class FixAccountsUniqueIndex < ActiveRecord::Migration[5.2]
class Account < ApplicationRecord
# Dummy class, to make migration possible across version changes
has_one :user, inverse_of: :account
def local?
domain.nil?
end
end
disable_ddl_transaction!
def up
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment