Fix notifications
https://gitlab.com/soapbox-pub/soapbox/merge_requests/120/diffs#diff-content-917c7fb80cf426cfae1e7baaa21b3d90ccb2b29c
This commit is contained in:
@@ -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
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class ValidateAddForeignKeyConstraintToUserLastReadNotification < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
validate_foreign_key :users, :notifications
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user