From b9b0313c78ca4efcc8cda089c652be0b333aa16a Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 28 Jul 2019 17:47:37 +0200 Subject: Revert "Remove conversation URI (#11423)" (#11424) This reverts commit 75f7f9930eb2a6f5c4041ec44fe0aa795c9ec449. --- .../20190519130537_remove_boosts_widening_audience.rb | 2 -- .../20190728084117_remove_uri_from_conversations.rb | 12 ------------ db/schema.rb | 4 +++- 3 files changed, 3 insertions(+), 15 deletions(-) delete mode 100644 db/post_migrate/20190728084117_remove_uri_from_conversations.rb (limited to 'db') diff --git a/db/post_migrate/20190519130537_remove_boosts_widening_audience.rb b/db/post_migrate/20190519130537_remove_boosts_widening_audience.rb index b89efd989..d2d924239 100644 --- a/db/post_migrate/20190519130537_remove_boosts_widening_audience.rb +++ b/db/post_migrate/20190519130537_remove_boosts_widening_audience.rb @@ -1,5 +1,3 @@ -# frozen_string_literal: true - class RemoveBoostsWideningAudience < ActiveRecord::Migration[5.2] disable_ddl_transaction! diff --git a/db/post_migrate/20190728084117_remove_uri_from_conversations.rb b/db/post_migrate/20190728084117_remove_uri_from_conversations.rb deleted file mode 100644 index b2b157ef7..000000000 --- a/db/post_migrate/20190728084117_remove_uri_from_conversations.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -class RemoveUriFromConversations < ActiveRecord::Migration[5.2] - def up - safety_assured { remove_column :conversations, :uri, :string } - end - - def down - add_column :conversations, :uri, :string - add_index :conversations, :uri, unique: true - end -end diff --git a/db/schema.rb b/db/schema.rb index a722bad36..1847305c7 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_28_084117) do +ActiveRecord::Schema.define(version: 2019_07_26_175042) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -203,8 +203,10 @@ ActiveRecord::Schema.define(version: 2019_07_28_084117) do end create_table "conversations", force: :cascade do |t| + t.string "uri" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.index ["uri"], name: "index_conversations_on_uri", unique: true end create_table "custom_emoji_categories", force: :cascade do |t| -- cgit