about summary refs log tree commit diff
path: root/db
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-07-23 16:48:08 -0500
committermultiple creatures <dev@multiple-creature.party>2019-07-23 16:48:08 -0500
commit3862f48c34a00691a12c6002abd88b088cf7c13e (patch)
treef1d5d2299de3d470816300221d3dba6ac8ecc30c /db
parent2a6ccce070277c8c278a2e8403f45394eec06f91 (diff)
add self-destructing roars & `live`/`lifespan` bangtags
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