Fix missing/incorrect Model specifications in migrations
We need to define the required models within the migration (not below) to work reliably.
This commit is contained in:

committed by
Sebastian Serth

parent
cef961a1e7
commit
6c44ffbd5c
@ -1,6 +1,13 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AddUserToProxyExercise < ActiveRecord::Migration[5.2]
|
||||
class Internaluser < ApplicationRecord
|
||||
end
|
||||
|
||||
class ProxyExercise < ApplicationRecord
|
||||
belongs_to :user, polymorphic: true
|
||||
end
|
||||
|
||||
def change
|
||||
add_reference :proxy_exercises, :user, polymorphic: true, index: true
|
||||
add_column :proxy_exercises, :public, :boolean, null: false, default: false
|
||||
|
Reference in New Issue
Block a user