scinote-web/db/migrate/20160928114119_create_notifications.rb
2016-09-29 14:49:58 +02:00

15 lines
386 B
Ruby

class CreateNotifications < ActiveRecord::Migration
def change
create_table :notifications do |t|
t.string :title
t.string :message
t.integer :type_of, null: false
t.integer :generator_user_id
t.timestamps null: false
end
add_index :notifications, :created_at
add_foreign_key :notifications, :users, column: :generator_user_id
end
end