about summary refs log tree commit diff
path: root/db/migrate
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>2017-04-30 21:49:24 +0900
committerMatt Jankowski <mjankowski@thoughtbot.com>2017-04-30 08:49:24 -0400
commita6788662b09164cfbaf1cebe6c8abc5123452285 (patch)
tree695c32806c43416f16aea7dd73c507ed42799ca2 /db/migrate
parent4a5f73c8aef7500a0efe7d800447e288674bf54a (diff)
Revert "Use PostgreSQL inheritance for blocks and mutes (#2520)" (#2634)
This reverts commit 5135d609b774b177d3d3894b176a822d86b73d3c.
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20180428000000_create_block_mutes.rb19
1 files changed, 0 insertions, 19 deletions
diff --git a/db/migrate/20180428000000_create_block_mutes.rb b/db/migrate/20180428000000_create_block_mutes.rb
deleted file mode 100644
index 149c91a4d..000000000
--- a/db/migrate/20180428000000_create_block_mutes.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-class CreateBlockMutes < ActiveRecord::Migration[5.0]
-  def change
-    create_table "block_mutes", force: :casecade do |t|
-      t.integer  "account_id",        null: false
-      t.integer  "target_account_id", null: false
-      t.boolean  "block",             null: false
-      t.datetime "created_at",        null: false
-      t.datetime "updated_at",        null: false
-    end
-
-    add_column       :blocks, :block, :boolean, null: false
-    execute          "ALTER TABLE blocks ADD CONSTRAINT check_mutes_on_block CHECK(block = TRUE), INHERIT block_mutes"
-    Block.update_all block: true
-
-    add_column       :mutes, :block, :boolean, null: false
-    execute          "ALTER TABLE mutes ADD CONSTRAINT check_mutes_on_block CHECK(block = FALSE), INHERIT block_mutes"
-    Mute.update_all block: false
-  end
-end