0
0
Fork 0

Add foreign key to prevent reblogs of non-existent (after race conditions) statuses from happening

Fix issue with detailed status view not supporting unreblogging/unfavouriting
This commit is contained in:
Eugen Rochko 2017-02-17 02:33:10 +01:00
parent 5ddad41245
commit a1e96ae94f
3 changed files with 17 additions and 3 deletions

View file

@ -0,0 +1,5 @@
class AddReblogOfIdForeignKeyToStatuses < ActiveRecord::Migration[5.0]
def change
add_foreign_key :statuses, :statuses, column: :reblog_of_id, on_delete: :cascade
end
end