16 lines
406 B
Ruby
16 lines
406 B
Ruby
class CreateFavoriteCourses < ActiveRecord::Migration[6.0]
|
|
def change
|
|
create_table :favorite_courses , primary_key: [:id, :user_id] do |t|
|
|
t.integer :id
|
|
t.belongs_to :user
|
|
t.string :number, null: false
|
|
t.string :semester, null: false
|
|
t.string :title, null: false
|
|
t.string :personal_annotation
|
|
t.string :personal_keyword
|
|
|
|
t.timestamps
|
|
end
|
|
end
|
|
end
|