Persist reasons for notifications to db

This commit is contained in:
Maximilian Grundke
2018-02-26 15:26:48 +01:00
parent cce6b5532d
commit 357712eac7
5 changed files with 57 additions and 17 deletions

View File

@@ -0,0 +1,11 @@
class CreateAnomalyNotifications < ActiveRecord::Migration
def change
create_table :anomaly_notifications do |t|
t.belongs_to :user, polymorphic: true, index: true
t.belongs_to :exercise, index: true
t.belongs_to :exercise_collection, index: true
t.string :reason
t.timestamps
end
end
end