Refactored whois_body to whois_record

This commit is contained in:
Priit Tark 2015-04-22 17:13:10 +03:00
parent db81a9e7bc
commit a0c880151b
10 changed files with 68 additions and 46 deletions

View file

@ -0,0 +1,9 @@
class RenameWhoisBody < ActiveRecord::Migration
def change
rename_column :whois_bodies, :whois_body, :body
rename_column :whois_bodies, :whois_json, :json
remove_index :whois_bodies, :domain_id
rename_table :whois_bodies, :whois_records
add_index :whois_records, :domain_id
end
end

View file

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20150423083308) do
ActiveRecord::Schema.define(version: 20150422134243) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -910,16 +910,16 @@ ActiveRecord::Schema.define(version: 20150423083308) do
t.text "depricated_table_but_somehow_paper_trail_tests_fails_without_it"
end
create_table "whois_bodies", force: :cascade do |t|
create_table "whois_records", force: :cascade do |t|
t.integer "domain_id"
t.string "name"
t.text "whois_body"
t.json "whois_json"
t.text "body"
t.json "json"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_index "whois_bodies", ["domain_id"], name: "index_whois_bodies_on_domain_id", using: :btree
add_index "whois_records", ["domain_id"], name: "index_whois_records_on_domain_id", using: :btree
create_table "zonefile_settings", force: :cascade do |t|
t.string "origin"

View file

@ -14,16 +14,16 @@
ActiveRecord::Schema.define(version: 20150113113236) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
# enable_extension "plpgsql"
create_table "domains", force: :cascade do |t|
create_table "whois_records", force: :cascade do |t|
t.string "name"
t.text "whois_body"
t.json "whois_json"
t.text "body"
t.json "json"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_index "domains", ["name"], name: "index_domains_on_name", using: :btree
add_index "whois_records", ["name"], name: "index_domains_on_name", using: :btree
end