mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-22 14:15:22 +00:00
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.
This commit is contained in:
parent
44680c46ed
commit
cbc2e6bd40
|
@ -1,4 +1,13 @@
|
||||||
class FixAccountsUniqueIndex < ActiveRecord::Migration[5.2]
|
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!
|
disable_ddl_transaction!
|
||||||
|
|
||||||
def up
|
def up
|
||||||
|
|
Loading…
Reference in a new issue