mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
WhoisBody refactored to has_one
This commit is contained in:
parent
82fd2db963
commit
db81a9e7bc
6 changed files with 62 additions and 27 deletions
15
db/migrate/20150422092514_add_whois_body_to_registry.rb
Normal file
15
db/migrate/20150422092514_add_whois_body_to_registry.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
class AddWhoisBodyToRegistry < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :whois_bodies, force: :cascade do |t|
|
||||
t.integer :domain_id
|
||||
t.string :name
|
||||
t.text :whois_body
|
||||
t.json :whois_json
|
||||
t.datetime :created_at, null: false
|
||||
t.datetime :updated_at, null: false
|
||||
end
|
||||
add_index :whois_bodies, :domain_id
|
||||
remove_column :domains, :whois_body, :text
|
||||
remove_column :domains, :whois_json, :json
|
||||
end
|
||||
end
|
17
db/schema.rb
17
db/schema.rb
|
@ -294,13 +294,15 @@ ActiveRecord::Schema.define(version: 20150423083308) do
|
|||
t.string "period_unit", limit: 1
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
t.text "whois_body"
|
||||
t.integer "legacy_id"
|
||||
t.integer "legacy_registrar_id"
|
||||
t.integer "legacy_registrant_id"
|
||||
t.json "whois_json"
|
||||
t.datetime "outzone_at"
|
||||
t.datetime "delete_at"
|
||||
end
|
||||
|
||||
add_index "domains", ["delete_at"], name: "index_domains_on_delete_at", using: :btree
|
||||
add_index "domains", ["outzone_at"], name: "index_domains_on_outzone_at", using: :btree
|
||||
add_index "domains", ["registrant_id"], name: "index_domains_on_registrant_id", using: :btree
|
||||
add_index "domains", ["registrar_id"], name: "index_domains_on_registrar_id", using: :btree
|
||||
|
||||
|
@ -908,6 +910,17 @@ 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|
|
||||
t.integer "domain_id"
|
||||
t.string "name"
|
||||
t.text "whois_body"
|
||||
t.json "whois_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
|
||||
|
||||
create_table "zonefile_settings", force: :cascade do |t|
|
||||
t.string "origin"
|
||||
t.integer "ttl"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue