Cache contact code for epp eager errors

This commit is contained in:
Martin Lensment 2014-12-10 11:35:48 +02:00
parent 8aac684df7
commit ddd91d464a
9 changed files with 42 additions and 14 deletions

View file

@ -0,0 +1,10 @@
class AddCodeCacheForDomainContact < ActiveRecord::Migration
def change
add_column :domain_contacts, :contact_code_cache, :string
DomainContact.all.each do |x|
x.contact_code_cache = x.contact.code
x.save
end
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: 20141203090115) do
ActiveRecord::Schema.define(version: 20141210085432) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -139,6 +139,7 @@ ActiveRecord::Schema.define(version: 20141203090115) do
t.string "contact_type"
t.datetime "created_at"
t.datetime "updated_at"
t.string "contact_code_cache"
end
create_table "domain_status_versions", force: true do |t|