mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 01:33:36 +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
|
Loading…
Add table
Add a link
Reference in a new issue