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.
This commit is contained in:
ThibG 2018-08-11 18:00:41 +02:00 committed by Eugen Rochko
parent 3f4812c583
commit f6ad5edbaa
1 changed files with 9 additions and 0 deletions

View File

@ -1,4 +1,13 @@
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?
def up