chinwagsocial/db/migrate/20170217012631_add_reblog_of_id_foreign_key_to_statuses.rb
Eugen Rochko a1e96ae94f 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
2017-02-17 02:33:10 +01:00

6 lines
179 B
Ruby

class AddReblogOfIdForeignKeyToStatuses < ActiveRecord::Migration[5.0]
def change
add_foreign_key :statuses, :statuses, column: :reblog_of_id, on_delete: :cascade
end
end