Add event model
This commit is contained in:
12
db/migrate/20180814145059_create_events.rb
Normal file
12
db/migrate/20180814145059_create_events.rb
Normal 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
|
Reference in New Issue
Block a user