Files
codeocean/db/migrate/20180814145059_create_events.rb
Maximilian Grundke d6c64f5b91 Add event model
2018-08-14 16:59:58 +02:00

13 lines
318 B
Ruby

class CreateEvents < ActiveRecord::Migration
def change
create_table :events do |t|
t.string :type
t.string :data
t.belongs_to :user, polymorphic: true, index: true
t.belongs_to :exercise, index: true
t.belongs_to :file, index: true
t.timestamps null: false
end
end
end