Add event model

This commit is contained in:
Maximilian Grundke
2018-08-14 16:59:58 +02:00
parent 81f1e08cc6
commit d6c64f5b91
3 changed files with 33 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
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