mgabdev
2020-01-16 18:24:10 -05:00
parent 292991bf33
commit 7fb0b462e2
13 changed files with 91 additions and 8 deletions
@@ -0,0 +1,5 @@
class AddLastReadNotificationToUser < ActiveRecord::Migration[5.2]
def change
add_column :users, :last_read_notification, :bigint
end
end
@@ -0,0 +1,5 @@
class AddForeignKeyConstraintToUserLastReadNotification < ActiveRecord::Migration[5.2]
def change
add_foreign_key :users, :notifications, column: :last_read_notification, on_delete: :nullify, validate: false
end
end
@@ -0,0 +1,5 @@
class ValidateAddForeignKeyConstraintToUserLastReadNotification < ActiveRecord::Migration[5.2]
def change
validate_foreign_key :users, :notifications
end
end