about summary refs log tree commit diff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20190723152514_create_destructing_statuses.rb9
-rw-r--r--db/schema.rb10
2 files changed, 18 insertions, 1 deletions
diff --git a/db/migrate/20190723152514_create_destructing_statuses.rb b/db/migrate/20190723152514_create_destructing_statuses.rb
new file mode 100644
index 000000000..baed9035a
--- /dev/null
+++ b/db/migrate/20190723152514_create_destructing_statuses.rb
@@ -0,0 +1,9 @@
+class CreateDestructingStatuses < ActiveRecord::Migration[5.2]
+  def change
+    create_table :destructing_statuses do |t|
+      t.references :status, foreign_key: true
+      t.datetime :delete_after
+    end
+    add_index :destructing_statuses, :delete_after
+  end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 2238213a4..23ad7cf13 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
 #
 # It's strongly recommended that you check this file into your version control system.
 
-ActiveRecord::Schema.define(version: 2019_07_22_014444) do
+ActiveRecord::Schema.define(version: 2019_07_23_152514) do
 
   # These are extensions that must be enabled in order to support this database
   enable_extension "plpgsql"
@@ -266,6 +266,13 @@ ActiveRecord::Schema.define(version: 2019_07_22_014444) do
     t.index ["account_id"], name: "index_custom_filters_on_account_id"
   end
 
+  create_table "destructing_statuses", force: :cascade do |t|
+    t.bigint "status_id"
+    t.datetime "delete_after"
+    t.index ["delete_after"], name: "index_destructing_statuses_on_delete_after"
+    t.index ["status_id"], name: "index_destructing_statuses_on_status_id"
+  end
+
   create_table "domain_blocks", force: :cascade do |t|
     t.string "domain", default: "", null: false
     t.datetime "created_at", null: false
@@ -817,6 +824,7 @@ ActiveRecord::Schema.define(version: 2019_07_22_014444) do
   add_foreign_key "conversation_mutes", "accounts", name: "fk_225b4212bb", on_delete: :cascade
   add_foreign_key "conversation_mutes", "conversations", on_delete: :cascade
   add_foreign_key "custom_filters", "accounts", on_delete: :cascade
+  add_foreign_key "destructing_statuses", "statuses"
   add_foreign_key "favourites", "accounts", name: "fk_5eb6c2b873", on_delete: :cascade
   add_foreign_key "favourites", "statuses", name: "fk_b0e856845e", on_delete: :cascade
   add_foreign_key "featured_tags", "accounts", on_delete: :cascade