From 75b1488cf4dfe54260deff8df20e5e9b9fd90aea Mon Sep 17 00:00:00 2001 From: ThibG Date: Fri, 18 Jan 2019 15:56:55 +0100 Subject: Add tombstones for remote statuses (#9830) * Add Tombstone model to remember object deletion * Do not recreate a status if it has been deleted * Record Tombstone for remote deleted items Also, only record deleted items from same-host actors * Clear an user's tombstones when their key change --- db/migrate/20190117114553_create_tombstones.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 db/migrate/20190117114553_create_tombstones.rb (limited to 'db/migrate/20190117114553_create_tombstones.rb') diff --git a/db/migrate/20190117114553_create_tombstones.rb b/db/migrate/20190117114553_create_tombstones.rb new file mode 100644 index 000000000..06d6d8c5a --- /dev/null +++ b/db/migrate/20190117114553_create_tombstones.rb @@ -0,0 +1,12 @@ +class CreateTombstones < ActiveRecord::Migration[5.2] + def change + create_table :tombstones do |t| + t.belongs_to :account, foreign_key: { on_delete: :cascade } + t.string :uri, null: false + + t.timestamps + end + + add_index :tombstones, :uri + end +end -- cgit