0
参照キーをクラスからKlassに変更したいと考えています。どのようにこれを行うか分からない。私はそれが素早く列の名前を変更すると仮定していますが、私は決して外部キーを変更することに慣れていません。私はそれが簡単だと確信していますが、何かをねじにしたくありません。外部キーの名前を変更する
class Schedule < ActiveRecord::Migration[5.1]
def change
create_table :schedules, id: false do |t|
t.references :class, index: true, foreign_key: true
t.references :student, index: true, foreign_key: true
t.timestamps
end
end
end