about summary refs log tree commit diff
path: root/db/migrate/20190117114553_create_tombstones.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-01-20 13:56:37 +0100
committerGitHub <noreply@github.com>2019-01-20 13:56:37 +0100
commitaa362ab73dc7121104b3c01800152b9fc56ea396 (patch)
treef0f5879a51325856887a2e32a4c3f9654af61aab /db/migrate/20190117114553_create_tombstones.rb
parent530d29148ca0c5bf29f6fa516b1ef4f91d95894b (diff)
parent5145c81620efbd5cf8dc911858d17d1fa888c996 (diff)
Merge pull request #888 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'db/migrate/20190117114553_create_tombstones.rb')
-rw-r--r--db/migrate/20190117114553_create_tombstones.rb12
1 files changed, 12 insertions, 0 deletions
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