tiss2go/db/migrate/20200525132942_create_favorite_theses.rb
2020-06-04 21:51:52 +02:00

14 lines
340 B
Ruby

class CreateFavoriteTheses < ActiveRecord::Migration[6.0]
def change
create_table :favorite_theses, id: false do |t|
t.integer :id, null: false
t.integer :user_id, null: false
t.string :title
t.string :personal_annotation
t.timestamps
end
add_index :favorite_theses, :id, unique: true
end
end