mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 01:17:18 +02:00
Merge branch '105046446-users_import' into staging
This commit is contained in:
commit
168efc98fa
6 changed files with 185 additions and 1096 deletions
|
@ -3,6 +3,7 @@ module Legacy
|
|||
self.table_name = :registrar
|
||||
|
||||
has_many :invoices, foreign_key: :registrarid
|
||||
has_one :acl, foreign_key: :registrarid, class_name: "Legacy::RegistrarAcl"
|
||||
|
||||
def account_balance
|
||||
invoices.sum(:credit)
|
||||
|
|
5
app/models/legacy/registrar_acl.rb
Normal file
5
app/models/legacy/registrar_acl.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
module Legacy
|
||||
class RegistrarAcl < Db
|
||||
self.table_name = :registraracl
|
||||
end
|
||||
end
|
5
db/migrate/20151029152638_add_legacy_id_to_users.rb
Normal file
5
db/migrate/20151029152638_add_legacy_id_to_users.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class AddLegacyIdToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :legacy_id, :integer
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20151028183132) do
|
||||
ActiveRecord::Schema.define(version: 20151029152638) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
@ -240,20 +240,19 @@ ActiveRecord::Schema.define(version: 20151028183132) do
|
|||
end
|
||||
|
||||
create_table "dnskeys", force: :cascade do |t|
|
||||
t.integer "domain_id"
|
||||
t.integer "flags"
|
||||
t.integer "protocol"
|
||||
t.integer "alg"
|
||||
t.text "public_key"
|
||||
t.integer "delegation_signer_id"
|
||||
t.string "ds_key_tag"
|
||||
t.integer "ds_alg"
|
||||
t.integer "ds_digest_type"
|
||||
t.string "ds_digest"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
t.integer "legacy_domain_id"
|
||||
t.datetime "updated_at"
|
||||
t.integer "domain_id"
|
||||
t.integer "flags"
|
||||
t.integer "protocol"
|
||||
t.integer "alg"
|
||||
t.text "public_key"
|
||||
t.integer "delegation_signer_id"
|
||||
t.string "ds_key_tag"
|
||||
t.integer "ds_alg"
|
||||
t.integer "ds_digest_type"
|
||||
t.string "ds_digest"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
t.integer "legacy_domain_id"
|
||||
end
|
||||
|
||||
add_index "dnskeys", ["delegation_signer_id"], name: "index_dnskeys_on_delegation_signer_id", using: :btree
|
||||
|
@ -452,28 +451,15 @@ ActiveRecord::Schema.define(version: 20151028183132) do
|
|||
add_index "legal_documents", ["documentable_type", "documentable_id"], name: "index_legal_documents_on_documentable_type_and_documentable_id", using: :btree
|
||||
|
||||
create_table "log_account_activities", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "whodunnit"
|
||||
t.json "object"
|
||||
t.json "object_changes"
|
||||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.integer "account_id"
|
||||
t.integer "invoice_id"
|
||||
t.decimal "sum"
|
||||
t.string "currency"
|
||||
t.integer "bank_transaction_id"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "description"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
t.string "activity_type"
|
||||
t.integer "log_pricelist_id"
|
||||
end
|
||||
|
||||
add_index "log_account_activities", ["item_type", "item_id"], name: "index_log_account_activities_on_item_type_and_item_id", using: :btree
|
||||
|
@ -489,44 +475,21 @@ ActiveRecord::Schema.define(version: 20151028183132) do
|
|||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.integer "registrar_id"
|
||||
t.string "account_type"
|
||||
t.decimal "balance"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "currency"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
end
|
||||
|
||||
add_index "log_accounts", ["item_type", "item_id"], name: "index_log_accounts_on_item_type_and_item_id", using: :btree
|
||||
add_index "log_accounts", ["whodunnit"], name: "index_log_accounts_on_whodunnit", using: :btree
|
||||
|
||||
create_table "log_addresses", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "whodunnit"
|
||||
t.json "object"
|
||||
t.json "object_changes"
|
||||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.integer "contact_id"
|
||||
t.string "city"
|
||||
t.string "street"
|
||||
t.string "zip"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "street2"
|
||||
t.string "street3"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
t.string "country_code"
|
||||
t.string "state"
|
||||
t.integer "legacy_contact_id"
|
||||
end
|
||||
|
||||
add_index "log_addresses", ["item_type", "item_id"], name: "index_log_addresses_on_item_type_and_item_id", using: :btree
|
||||
|
@ -548,56 +511,30 @@ ActiveRecord::Schema.define(version: 20151028183132) do
|
|||
add_index "log_api_users", ["whodunnit"], name: "index_log_api_users_on_whodunnit", using: :btree
|
||||
|
||||
create_table "log_bank_statements", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "whodunnit"
|
||||
t.json "object"
|
||||
t.json "object_changes"
|
||||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.string "bank_code"
|
||||
t.string "iban"
|
||||
t.string "import_file_path"
|
||||
t.datetime "queried_at"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
end
|
||||
|
||||
add_index "log_bank_statements", ["item_type", "item_id"], name: "index_log_bank_statements_on_item_type_and_item_id", using: :btree
|
||||
add_index "log_bank_statements", ["whodunnit"], name: "index_log_bank_statements_on_whodunnit", using: :btree
|
||||
|
||||
create_table "log_bank_transactions", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "whodunnit"
|
||||
t.json "object"
|
||||
t.json "object_changes"
|
||||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.integer "bank_statement_id"
|
||||
t.string "bank_reference"
|
||||
t.string "iban"
|
||||
t.string "currency"
|
||||
t.string "buyer_bank_code"
|
||||
t.string "buyer_iban"
|
||||
t.string "buyer_name"
|
||||
t.string "document_no"
|
||||
t.string "description"
|
||||
t.decimal "sum"
|
||||
t.string "reference_no"
|
||||
t.datetime "paid_at"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
end
|
||||
|
||||
add_index "log_bank_transactions", ["item_type", "item_id"], name: "index_log_bank_transactions_on_item_type_and_item_id", using: :btree
|
||||
|
@ -613,12 +550,6 @@ ActiveRecord::Schema.define(version: 20151028183132) do
|
|||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.string "names", array: true
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
end
|
||||
|
||||
add_index "log_blocked_domains", ["item_type", "item_id"], name: "index_log_blocked_domains_on_item_type_and_item_id", using: :btree
|
||||
|
@ -634,17 +565,6 @@ ActiveRecord::Schema.define(version: 20151028183132) do
|
|||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.integer "api_user_id"
|
||||
t.text "csr"
|
||||
t.text "crt"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "common_name"
|
||||
t.string "md5"
|
||||
t.string "interface"
|
||||
end
|
||||
|
||||
add_index "log_certificates", ["item_type", "item_id"], name: "index_log_certificates_on_item_type_and_item_id", using: :btree
|
||||
|
@ -666,41 +586,15 @@ ActiveRecord::Schema.define(version: 20151028183132) do
|
|||
add_index "log_contact_statuses", ["whodunnit"], name: "index_log_contact_statuses_on_whodunnit", using: :btree
|
||||
|
||||
create_table "log_contacts", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "whodunnit"
|
||||
t.json "object"
|
||||
t.json "object_changes"
|
||||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.string "code"
|
||||
t.string "phone"
|
||||
t.string "email"
|
||||
t.string "fax"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "ident"
|
||||
t.string "ident_type"
|
||||
t.string "auth_info"
|
||||
t.string "name"
|
||||
t.string "org_name"
|
||||
t.integer "registrar_id"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
t.string "ident_country_code"
|
||||
t.string "city"
|
||||
t.text "street"
|
||||
t.string "zip"
|
||||
t.string "country_code"
|
||||
t.string "state"
|
||||
t.integer "legacy_id"
|
||||
t.string "statuses", array: true
|
||||
t.hstore "status_notes"
|
||||
t.integer "legacy_history_id"
|
||||
t.integer "copy_from_id"
|
||||
t.datetime "ident_updated_at"
|
||||
end
|
||||
|
||||
|
@ -723,153 +617,78 @@ ActiveRecord::Schema.define(version: 20151028183132) do
|
|||
add_index "log_countries", ["whodunnit"], name: "index_log_countries_on_whodunnit", using: :btree
|
||||
|
||||
create_table "log_dnskeys", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "whodunnit"
|
||||
t.json "object"
|
||||
t.json "object_changes"
|
||||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.integer "domain_id"
|
||||
t.integer "flags"
|
||||
t.integer "protocol"
|
||||
t.integer "alg"
|
||||
t.text "public_key"
|
||||
t.integer "delegation_signer_id"
|
||||
t.string "ds_key_tag"
|
||||
t.integer "ds_alg"
|
||||
t.integer "ds_digest_type"
|
||||
t.string "ds_digest"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
t.integer "legacy_domain_id"
|
||||
end
|
||||
|
||||
add_index "log_dnskeys", ["item_type", "item_id"], name: "index_log_dnskeys_on_item_type_and_item_id", using: :btree
|
||||
add_index "log_dnskeys", ["whodunnit"], name: "index_log_dnskeys_on_whodunnit", using: :btree
|
||||
|
||||
create_table "log_domain_contacts", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "whodunnit"
|
||||
t.json "object"
|
||||
t.json "object_changes"
|
||||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.integer "contact_id"
|
||||
t.integer "domain_id"
|
||||
t.string "contact_type"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "contact_code_cache"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
t.string "type"
|
||||
t.integer "legacy_domain_id"
|
||||
t.integer "legacy_contact_id"
|
||||
end
|
||||
|
||||
add_index "log_domain_contacts", ["item_type", "item_id"], name: "index_log_domain_contacts_on_item_type_and_item_id", using: :btree
|
||||
add_index "log_domain_contacts", ["whodunnit"], name: "index_log_domain_contacts_on_whodunnit", using: :btree
|
||||
|
||||
create_table "log_domain_statuses", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "whodunnit"
|
||||
t.json "object"
|
||||
t.json "object_changes"
|
||||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.integer "domain_id"
|
||||
t.string "description"
|
||||
t.string "value"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
t.integer "legacy_domain_id"
|
||||
end
|
||||
|
||||
add_index "log_domain_statuses", ["item_type", "item_id"], name: "index_log_domain_statuses_on_item_type_and_item_id", using: :btree
|
||||
add_index "log_domain_statuses", ["whodunnit"], name: "index_log_domain_statuses_on_whodunnit", using: :btree
|
||||
|
||||
create_table "log_domain_transfers", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "whodunnit"
|
||||
t.json "object"
|
||||
t.json "object_changes"
|
||||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.integer "domain_id"
|
||||
t.string "status"
|
||||
t.datetime "transfer_requested_at"
|
||||
t.datetime "transferred_at"
|
||||
t.integer "transfer_from_id"
|
||||
t.integer "transfer_to_id"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.datetime "wait_until"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
end
|
||||
|
||||
add_index "log_domain_transfers", ["item_type", "item_id"], name: "index_log_domain_transfers_on_item_type_and_item_id", using: :btree
|
||||
add_index "log_domain_transfers", ["whodunnit"], name: "index_log_domain_transfers_on_whodunnit", using: :btree
|
||||
|
||||
create_table "log_domains", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "whodunnit"
|
||||
t.json "object"
|
||||
t.json "object_changes"
|
||||
t.datetime "created_at"
|
||||
t.text "nameserver_ids", default: [], array: true
|
||||
t.text "tech_contact_ids", default: [], array: true
|
||||
t.text "admin_contact_ids", default: [], array: true
|
||||
t.text "nameserver_ids", default: [], array: true
|
||||
t.text "tech_contact_ids", default: [], array: true
|
||||
t.text "admin_contact_ids", default: [], array: true
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.string "name"
|
||||
t.integer "registrar_id"
|
||||
t.datetime "registered_at"
|
||||
t.string "status"
|
||||
t.datetime "valid_from"
|
||||
t.datetime "valid_to"
|
||||
t.integer "registrant_id"
|
||||
t.string "auth_info"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "name_dirty"
|
||||
t.string "name_puny"
|
||||
t.integer "period"
|
||||
t.string "period_unit"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
t.integer "legacy_id"
|
||||
t.integer "legacy_registrar_id"
|
||||
t.integer "legacy_registrant_id"
|
||||
t.datetime "outzone_at"
|
||||
t.datetime "delete_at"
|
||||
t.datetime "registrant_verification_asked_at"
|
||||
t.string "registrant_verification_token"
|
||||
t.json "pending_json"
|
||||
t.datetime "force_delete_at"
|
||||
t.string "statuses", array: true
|
||||
t.boolean "reserved"
|
||||
t.hstore "status_notes"
|
||||
t.string "statuses_backup", array: true
|
||||
end
|
||||
|
||||
add_index "log_domains", ["item_type", "item_id"], name: "index_log_domains_on_item_type_and_item_id", using: :btree
|
||||
|
@ -885,135 +704,12 @@ ActiveRecord::Schema.define(version: 20151028183132) do
|
|||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.integer "invoice_id"
|
||||
t.string "description"
|
||||
t.string "unit"
|
||||
t.integer "amount"
|
||||
t.decimal "price"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
end
|
||||
|
||||
add_index "log_invoice_items", ["item_type", "item_id"], name: "index_log_invoice_items_on_item_type_and_item_id", using: :btree
|
||||
add_index "log_invoice_items", ["whodunnit"], name: "index_log_invoice_items_on_whodunnit", using: :btree
|
||||
|
||||
create_table "log_invoices", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "whodunnit"
|
||||
t.json "object"
|
||||
t.json "object_changes"
|
||||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "invoice_type"
|
||||
t.datetime "due_date"
|
||||
t.string "payment_term"
|
||||
t.string "currency"
|
||||
t.string "description"
|
||||
t.string "reference_no"
|
||||
t.decimal "vat_prc"
|
||||
t.datetime "paid_at"
|
||||
t.integer "seller_id"
|
||||
t.string "seller_name"
|
||||
t.string "seller_reg_no"
|
||||
t.string "seller_iban"
|
||||
t.string "seller_bank"
|
||||
t.string "seller_swift"
|
||||
t.string "seller_vat_no"
|
||||
t.string "seller_country_code"
|
||||
t.string "seller_state"
|
||||
t.string "seller_street"
|
||||
t.string "seller_city"
|
||||
t.string "seller_zip"
|
||||
t.string "seller_phone"
|
||||
t.string "seller_url"
|
||||
t.string "seller_email"
|
||||
t.string "seller_contact_name"
|
||||
t.integer "buyer_id"
|
||||
t.string "buyer_name"
|
||||
t.string "buyer_reg_no"
|
||||
t.string "buyer_country_code"
|
||||
t.string "buyer_state"
|
||||
t.string "buyer_street"
|
||||
t.string "buyer_city"
|
||||
t.string "buyer_zip"
|
||||
t.string "buyer_phone"
|
||||
t.string "buyer_url"
|
||||
t.string "buyer_email"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
t.integer "number"
|
||||
t.datetime "cancelled_at"
|
||||
t.decimal "sum_cache"
|
||||
end
|
||||
|
||||
add_index "log_invoices", ["item_type", "item_id"], name: "index_log_invoices_on_item_type_and_item_id", using: :btree
|
||||
add_index "log_invoices", ["whodunnit"], name: "index_log_invoices_on_whodunnit", using: :btree
|
||||
|
||||
create_table "log_keyrelays", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "whodunnit"
|
||||
t.json "object"
|
||||
t.json "object_changes"
|
||||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.integer "domain_id"
|
||||
t.datetime "pa_date"
|
||||
t.string "key_data_flags"
|
||||
t.string "key_data_protocol"
|
||||
t.string "key_data_alg"
|
||||
t.text "key_data_public_key"
|
||||
t.string "auth_info_pw"
|
||||
t.string "expiry_relative"
|
||||
t.datetime "expiry_absolute"
|
||||
t.integer "requester_id"
|
||||
t.integer "accepter_id"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
end
|
||||
|
||||
add_index "log_keyrelays", ["item_type", "item_id"], name: "index_log_keyrelays_on_item_type_and_item_id", using: :btree
|
||||
add_index "log_keyrelays", ["whodunnit"], name: "index_log_keyrelays_on_whodunnit", using: :btree
|
||||
|
||||
create_table "log_legal_documents", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "whodunnit"
|
||||
t.json "object"
|
||||
t.json "object_changes"
|
||||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.string "document_type"
|
||||
t.integer "documentable_id"
|
||||
t.string "documentable_type"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
t.string "path"
|
||||
end
|
||||
|
||||
add_index "log_legal_documents", ["item_type", "item_id"], name: "index_log_legal_documents_on_item_type_and_item_id", using: :btree
|
||||
add_index "log_legal_documents", ["whodunnit"], name: "index_log_legal_documents_on_whodunnit", using: :btree
|
||||
|
||||
create_table "log_mail_templates", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
|
@ -1023,151 +719,92 @@ ActiveRecord::Schema.define(version: 20151028183132) do
|
|||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.string "name"
|
||||
t.string "subject"
|
||||
t.string "from"
|
||||
t.string "bcc"
|
||||
t.string "cc"
|
||||
t.text "body"
|
||||
t.text "text_body"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
end
|
||||
|
||||
add_index "log_mail_templates", ["item_type", "item_id"], name: "index_log_mail_templates_on_item_type_and_item_id", using: :btree
|
||||
add_index "log_mail_templates", ["whodunnit"], name: "index_log_mail_templates_on_whodunnit", using: :btree
|
||||
add_index "log_invoices", ["item_type", "item_id"], name: "index_log_invoices_on_item_type_and_item_id", using: :btree
|
||||
add_index "log_invoices", ["whodunnit"], name: "index_log_invoices_on_whodunnit", using: :btree
|
||||
|
||||
create_table "log_messages", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
create_table "log_keyrelays", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "whodunnit"
|
||||
t.json "object"
|
||||
t.json "object_changes"
|
||||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
end
|
||||
|
||||
add_index "log_keyrelays", ["item_type", "item_id"], name: "index_log_keyrelays_on_item_type_and_item_id", using: :btree
|
||||
add_index "log_keyrelays", ["whodunnit"], name: "index_log_keyrelays_on_whodunnit", using: :btree
|
||||
|
||||
create_table "log_legal_documents", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "whodunnit"
|
||||
t.json "object"
|
||||
t.json "object_changes"
|
||||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
end
|
||||
|
||||
add_index "log_legal_documents", ["item_type", "item_id"], name: "index_log_legal_documents_on_item_type_and_item_id", using: :btree
|
||||
add_index "log_legal_documents", ["whodunnit"], name: "index_log_legal_documents_on_whodunnit", using: :btree
|
||||
|
||||
create_table "log_messages", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "whodunnit"
|
||||
t.json "object"
|
||||
t.json "object_changes"
|
||||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.integer "registrar_id"
|
||||
t.string "body"
|
||||
t.string "attached_obj_type"
|
||||
t.string "attached_obj_id"
|
||||
t.boolean "queued"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
end
|
||||
|
||||
add_index "log_messages", ["item_type", "item_id"], name: "index_log_messages_on_item_type_and_item_id", using: :btree
|
||||
add_index "log_messages", ["whodunnit"], name: "index_log_messages_on_whodunnit", using: :btree
|
||||
|
||||
create_table "log_nameservers", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "whodunnit"
|
||||
t.json "object"
|
||||
t.json "object_changes"
|
||||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.string "hostname"
|
||||
t.string "ipv4"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "ipv6"
|
||||
t.integer "domain_id"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
t.integer "legacy_domain_id"
|
||||
end
|
||||
|
||||
add_index "log_nameservers", ["item_type", "item_id"], name: "index_log_nameservers_on_item_type_and_item_id", using: :btree
|
||||
add_index "log_nameservers", ["whodunnit"], name: "index_log_nameservers_on_whodunnit", using: :btree
|
||||
|
||||
create_table "log_pricelists", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "whodunnit"
|
||||
t.json "object"
|
||||
t.json "object_changes"
|
||||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.integer "log_id"
|
||||
t.string "desc"
|
||||
t.string "category"
|
||||
t.decimal "price_cents"
|
||||
t.string "price_currency"
|
||||
t.datetime "valid_from"
|
||||
t.datetime "valid_to"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "duration"
|
||||
t.string "operation_category"
|
||||
end
|
||||
|
||||
create_table "log_registrant_verifications", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "whodunnit"
|
||||
t.json "object"
|
||||
t.json "object_changes"
|
||||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.string "domain_name"
|
||||
t.string "verification_token"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "action"
|
||||
t.integer "domain_id"
|
||||
t.string "action_type"
|
||||
end
|
||||
|
||||
add_index "log_registrant_verifications", ["item_type", "item_id"], name: "index_log_registrant_verifications_on_item_type_and_item_id", using: :btree
|
||||
add_index "log_registrant_verifications", ["whodunnit"], name: "index_log_registrant_verifications_on_whodunnit", using: :btree
|
||||
|
||||
create_table "log_registrars", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "whodunnit"
|
||||
t.json "object"
|
||||
t.json "object_changes"
|
||||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.string "name"
|
||||
t.string "reg_no"
|
||||
t.string "vat_no"
|
||||
t.string "billing_address"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
t.string "phone"
|
||||
t.string "email"
|
||||
t.string "billing_email"
|
||||
t.string "country_code"
|
||||
t.string "state"
|
||||
t.string "city"
|
||||
t.string "street"
|
||||
t.string "zip"
|
||||
t.string "code"
|
||||
t.string "url"
|
||||
t.string "directo_handle"
|
||||
t.boolean "vat"
|
||||
t.integer "legacy_id"
|
||||
t.string "reference_no"
|
||||
end
|
||||
|
||||
add_index "log_registrars", ["item_type", "item_id"], name: "index_log_registrars_on_item_type_and_item_id", using: :btree
|
||||
|
@ -1183,12 +820,6 @@ ActiveRecord::Schema.define(version: 20151028183132) do
|
|||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
t.hstore "names"
|
||||
end
|
||||
|
||||
add_index "log_reserved_domains", ["item_type", "item_id"], name: "index_log_reserved_domains_on_item_type_and_item_id", using: :btree
|
||||
|
@ -1204,56 +835,21 @@ ActiveRecord::Schema.define(version: 20151028183132) do
|
|||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.string "var"
|
||||
t.text "value"
|
||||
t.integer "thing_id"
|
||||
t.string "thing_type"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
end
|
||||
|
||||
add_index "log_settings", ["item_type", "item_id"], name: "index_log_settings_on_item_type_and_item_id", using: :btree
|
||||
add_index "log_settings", ["whodunnit"], name: "index_log_settings_on_whodunnit", using: :btree
|
||||
|
||||
create_table "log_users", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "whodunnit"
|
||||
t.json "object"
|
||||
t.json "object_changes"
|
||||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.string "username"
|
||||
t.string "password"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "email"
|
||||
t.integer "sign_in_count"
|
||||
t.datetime "current_sign_in_at"
|
||||
t.datetime "last_sign_in_at"
|
||||
t.inet "current_sign_in_ip"
|
||||
t.inet "last_sign_in_ip"
|
||||
t.string "identity_code"
|
||||
t.string "roles", array: true
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
t.string "country_code"
|
||||
t.integer "registrar_id"
|
||||
t.boolean "active"
|
||||
t.text "csr"
|
||||
t.text "crt"
|
||||
t.string "type"
|
||||
t.string "registrant_ident"
|
||||
t.string "encrypted_password"
|
||||
t.datetime "remember_created_at"
|
||||
t.integer "failed_attempts"
|
||||
t.datetime "locked_at"
|
||||
end
|
||||
|
||||
add_index "log_users", ["item_type", "item_id"], name: "index_log_users_on_item_type_and_item_id", using: :btree
|
||||
|
@ -1269,43 +865,18 @@ ActiveRecord::Schema.define(version: 20151028183132) do
|
|||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.integer "registrar_id"
|
||||
t.string "ipv4"
|
||||
t.string "ipv6"
|
||||
t.string "interfaces", array: true
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
end
|
||||
|
||||
create_table "log_zonefile_settings", force: :cascade do |t|
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "item_type", null: false
|
||||
t.integer "item_id", null: false
|
||||
t.string "event", null: false
|
||||
t.string "whodunnit"
|
||||
t.json "object"
|
||||
t.json "object_changes"
|
||||
t.datetime "created_at"
|
||||
t.string "session"
|
||||
t.json "children"
|
||||
t.integer "log_id"
|
||||
t.string "origin"
|
||||
t.integer "ttl"
|
||||
t.integer "refresh"
|
||||
t.integer "retry"
|
||||
t.integer "expire"
|
||||
t.integer "minimum_ttl"
|
||||
t.string "email"
|
||||
t.string "master_nameserver"
|
||||
t.datetime "log_created_at"
|
||||
t.datetime "log_updated_at"
|
||||
t.string "creator_str"
|
||||
t.string "updator_str"
|
||||
t.text "ns_records"
|
||||
t.text "a_records"
|
||||
t.text "a4_records"
|
||||
end
|
||||
|
||||
add_index "log_zonefile_settings", ["item_type", "item_id"], name: "index_log_zonefile_settings_on_item_type_and_item_id", using: :btree
|
||||
|
@ -1319,8 +890,8 @@ ActiveRecord::Schema.define(version: 20151028183132) do
|
|||
t.string "cc"
|
||||
t.text "body", null: false
|
||||
t.text "text_body", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "messages", force: :cascade do |t|
|
||||
|
@ -1482,6 +1053,7 @@ ActiveRecord::Schema.define(version: 20151028183132) do
|
|||
t.datetime "remember_created_at"
|
||||
t.integer "failed_attempts", default: 0, null: false
|
||||
t.datetime "locked_at"
|
||||
t.integer "legacy_id"
|
||||
end
|
||||
|
||||
add_index "users", ["identity_code"], name: "index_users_on_identity_code", using: :btree
|
||||
|
|
600
db/structure.sql
600
db/structure.sql
|
@ -745,8 +745,7 @@ CREATE TABLE dnskeys (
|
|||
ds_digest character varying,
|
||||
creator_str character varying,
|
||||
updator_str character varying,
|
||||
legacy_domain_id integer,
|
||||
updated_at timestamp without time zone
|
||||
legacy_domain_id integer
|
||||
);
|
||||
|
||||
|
||||
|
@ -1171,20 +1170,7 @@ CREATE TABLE log_account_activities (
|
|||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
account_id integer,
|
||||
invoice_id integer,
|
||||
sum numeric,
|
||||
currency character varying,
|
||||
bank_transaction_id integer,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
description character varying,
|
||||
creator_str character varying,
|
||||
updator_str character varying,
|
||||
activity_type character varying,
|
||||
log_pricelist_id integer
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -1221,16 +1207,7 @@ CREATE TABLE log_accounts (
|
|||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
registrar_id integer,
|
||||
account_type character varying,
|
||||
balance numeric,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
currency character varying,
|
||||
creator_str character varying,
|
||||
updator_str character varying
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -1267,21 +1244,7 @@ CREATE TABLE log_addresses (
|
|||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
contact_id integer,
|
||||
city character varying,
|
||||
street character varying,
|
||||
zip character varying,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
street2 character varying,
|
||||
street3 character varying,
|
||||
creator_str character varying,
|
||||
updator_str character varying,
|
||||
country_code character varying,
|
||||
state character varying,
|
||||
legacy_contact_id integer
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -1355,16 +1318,7 @@ CREATE TABLE log_bank_statements (
|
|||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
bank_code character varying,
|
||||
iban character varying,
|
||||
import_file_path character varying,
|
||||
queried_at timestamp without time zone,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
creator_str character varying,
|
||||
updator_str character varying
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -1401,24 +1355,7 @@ CREATE TABLE log_bank_transactions (
|
|||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
bank_statement_id integer,
|
||||
bank_reference character varying,
|
||||
iban character varying,
|
||||
currency character varying,
|
||||
buyer_bank_code character varying,
|
||||
buyer_iban character varying,
|
||||
buyer_name character varying,
|
||||
document_no character varying,
|
||||
description character varying,
|
||||
sum numeric,
|
||||
reference_no character varying,
|
||||
paid_at timestamp without time zone,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
creator_str character varying,
|
||||
updator_str character varying
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -1455,13 +1392,7 @@ CREATE TABLE log_blocked_domains (
|
|||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
names character varying[],
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
creator_str character varying,
|
||||
updator_str character varying
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -1498,18 +1429,7 @@ CREATE TABLE log_certificates (
|
|||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
api_user_id integer,
|
||||
csr text,
|
||||
crt text,
|
||||
creator_str character varying,
|
||||
updator_str character varying,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
common_name character varying,
|
||||
md5 character varying,
|
||||
interface character varying
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -1584,32 +1504,6 @@ CREATE TABLE log_contacts (
|
|||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
code character varying,
|
||||
phone character varying,
|
||||
email character varying,
|
||||
fax character varying,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
ident character varying,
|
||||
ident_type character varying,
|
||||
auth_info character varying,
|
||||
name character varying,
|
||||
org_name character varying,
|
||||
registrar_id integer,
|
||||
creator_str character varying,
|
||||
updator_str character varying,
|
||||
ident_country_code character varying,
|
||||
city character varying,
|
||||
street text,
|
||||
zip character varying,
|
||||
country_code character varying,
|
||||
state character varying,
|
||||
legacy_id integer,
|
||||
statuses character varying[],
|
||||
status_notes hstore,
|
||||
legacy_history_id integer,
|
||||
copy_from_id integer,
|
||||
ident_updated_at timestamp without time zone
|
||||
);
|
||||
|
||||
|
@ -1684,21 +1578,7 @@ CREATE TABLE log_dnskeys (
|
|||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
domain_id integer,
|
||||
flags integer,
|
||||
protocol integer,
|
||||
alg integer,
|
||||
public_key text,
|
||||
delegation_signer_id integer,
|
||||
ds_key_tag character varying,
|
||||
ds_alg integer,
|
||||
ds_digest_type integer,
|
||||
ds_digest character varying,
|
||||
creator_str character varying,
|
||||
updator_str character varying,
|
||||
legacy_domain_id integer
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -1735,19 +1615,7 @@ CREATE TABLE log_domain_contacts (
|
|||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
contact_id integer,
|
||||
domain_id integer,
|
||||
contact_type character varying,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
contact_code_cache character varying,
|
||||
creator_str character varying,
|
||||
updator_str character varying,
|
||||
type character varying,
|
||||
legacy_domain_id integer,
|
||||
legacy_contact_id integer
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -1784,14 +1652,7 @@ CREATE TABLE log_domain_statuses (
|
|||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
domain_id integer,
|
||||
description character varying,
|
||||
value character varying,
|
||||
creator_str character varying,
|
||||
updator_str character varying,
|
||||
legacy_domain_id integer
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -1828,19 +1689,7 @@ CREATE TABLE log_domain_transfers (
|
|||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
domain_id integer,
|
||||
status character varying,
|
||||
transfer_requested_at timestamp without time zone,
|
||||
transferred_at timestamp without time zone,
|
||||
transfer_from_id integer,
|
||||
transfer_to_id integer,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
wait_until timestamp without time zone,
|
||||
creator_str character varying,
|
||||
updator_str character varying
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -1880,37 +1729,7 @@ CREATE TABLE log_domains (
|
|||
tech_contact_ids text[] DEFAULT '{}'::text[],
|
||||
admin_contact_ids text[] DEFAULT '{}'::text[],
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
name character varying,
|
||||
registrar_id integer,
|
||||
registered_at timestamp without time zone,
|
||||
status character varying,
|
||||
valid_from timestamp without time zone,
|
||||
valid_to timestamp without time zone,
|
||||
registrant_id integer,
|
||||
auth_info character varying,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
name_dirty character varying,
|
||||
name_puny character varying,
|
||||
period integer,
|
||||
period_unit character varying,
|
||||
creator_str character varying,
|
||||
updator_str character varying,
|
||||
legacy_id integer,
|
||||
legacy_registrar_id integer,
|
||||
legacy_registrant_id integer,
|
||||
outzone_at timestamp without time zone,
|
||||
delete_at timestamp without time zone,
|
||||
registrant_verification_asked_at timestamp without time zone,
|
||||
registrant_verification_token character varying,
|
||||
pending_json json,
|
||||
force_delete_at timestamp without time zone,
|
||||
statuses character varying[],
|
||||
reserved boolean,
|
||||
status_notes hstore,
|
||||
statuses_backup character varying[]
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -1947,17 +1766,7 @@ CREATE TABLE log_invoice_items (
|
|||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
invoice_id integer,
|
||||
description character varying,
|
||||
unit character varying,
|
||||
amount integer,
|
||||
price numeric,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
creator_str character varying,
|
||||
updator_str character varying
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -1994,50 +1803,7 @@ CREATE TABLE log_invoices (
|
|||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
invoice_type character varying,
|
||||
due_date timestamp without time zone,
|
||||
payment_term character varying,
|
||||
currency character varying,
|
||||
description character varying,
|
||||
reference_no character varying,
|
||||
vat_prc numeric,
|
||||
paid_at timestamp without time zone,
|
||||
seller_id integer,
|
||||
seller_name character varying,
|
||||
seller_reg_no character varying,
|
||||
seller_iban character varying,
|
||||
seller_bank character varying,
|
||||
seller_swift character varying,
|
||||
seller_vat_no character varying,
|
||||
seller_country_code character varying,
|
||||
seller_state character varying,
|
||||
seller_street character varying,
|
||||
seller_city character varying,
|
||||
seller_zip character varying,
|
||||
seller_phone character varying,
|
||||
seller_url character varying,
|
||||
seller_email character varying,
|
||||
seller_contact_name character varying,
|
||||
buyer_id integer,
|
||||
buyer_name character varying,
|
||||
buyer_reg_no character varying,
|
||||
buyer_country_code character varying,
|
||||
buyer_state character varying,
|
||||
buyer_street character varying,
|
||||
buyer_city character varying,
|
||||
buyer_zip character varying,
|
||||
buyer_phone character varying,
|
||||
buyer_url character varying,
|
||||
buyer_email character varying,
|
||||
creator_str character varying,
|
||||
updator_str character varying,
|
||||
number integer,
|
||||
cancelled_at timestamp without time zone,
|
||||
sum_cache numeric
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -2074,23 +1840,7 @@ CREATE TABLE log_keyrelays (
|
|||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
domain_id integer,
|
||||
pa_date timestamp without time zone,
|
||||
key_data_flags character varying,
|
||||
key_data_protocol character varying,
|
||||
key_data_alg character varying,
|
||||
key_data_public_key text,
|
||||
auth_info_pw character varying,
|
||||
expiry_relative character varying,
|
||||
expiry_absolute timestamp without time zone,
|
||||
requester_id integer,
|
||||
accepter_id integer,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
creator_str character varying,
|
||||
updator_str character varying
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -2127,16 +1877,7 @@ CREATE TABLE log_legal_documents (
|
|||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
document_type character varying,
|
||||
documentable_id integer,
|
||||
documentable_type character varying,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
creator_str character varying,
|
||||
updator_str character varying,
|
||||
path character varying
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -2159,53 +1900,6 @@ CREATE SEQUENCE log_legal_documents_id_seq
|
|||
ALTER SEQUENCE log_legal_documents_id_seq OWNED BY log_legal_documents.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: log_mail_templates; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
CREATE TABLE log_mail_templates (
|
||||
id integer NOT NULL,
|
||||
item_type character varying NOT NULL,
|
||||
item_id integer NOT NULL,
|
||||
event character varying NOT NULL,
|
||||
whodunnit character varying,
|
||||
object json,
|
||||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
name character varying,
|
||||
subject character varying,
|
||||
"from" character varying,
|
||||
bcc character varying,
|
||||
cc character varying,
|
||||
body text,
|
||||
text_body text,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: log_mail_templates_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE SEQUENCE log_mail_templates_id_seq
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
|
||||
--
|
||||
-- Name: log_mail_templates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER SEQUENCE log_mail_templates_id_seq OWNED BY log_mail_templates.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: log_messages; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
@ -2220,17 +1914,7 @@ CREATE TABLE log_messages (
|
|||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
registrar_id integer,
|
||||
body character varying,
|
||||
attached_obj_type character varying,
|
||||
attached_obj_id character varying,
|
||||
queued boolean,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
creator_str character varying,
|
||||
updator_str character varying
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -2267,17 +1951,7 @@ CREATE TABLE log_nameservers (
|
|||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
hostname character varying,
|
||||
ipv4 character varying,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
ipv6 character varying,
|
||||
domain_id integer,
|
||||
creator_str character varying,
|
||||
updator_str character varying,
|
||||
legacy_domain_id integer
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -2313,20 +1987,7 @@ CREATE TABLE log_pricelists (
|
|||
object json,
|
||||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
log_id integer,
|
||||
"desc" character varying,
|
||||
category character varying,
|
||||
price_cents numeric,
|
||||
price_currency character varying,
|
||||
valid_from timestamp without time zone,
|
||||
valid_to timestamp without time zone,
|
||||
creator_str character varying,
|
||||
updator_str character varying,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
duration character varying,
|
||||
operation_category character varying
|
||||
session character varying
|
||||
);
|
||||
|
||||
|
||||
|
@ -2349,51 +2010,6 @@ CREATE SEQUENCE log_pricelists_id_seq
|
|||
ALTER SEQUENCE log_pricelists_id_seq OWNED BY log_pricelists.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: log_registrant_verifications; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
CREATE TABLE log_registrant_verifications (
|
||||
id integer NOT NULL,
|
||||
item_type character varying NOT NULL,
|
||||
item_id integer NOT NULL,
|
||||
event character varying NOT NULL,
|
||||
whodunnit character varying,
|
||||
object json,
|
||||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
domain_name character varying,
|
||||
verification_token character varying,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
action character varying,
|
||||
domain_id integer,
|
||||
action_type character varying
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: log_registrant_verifications_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE SEQUENCE log_registrant_verifications_id_seq
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
|
||||
--
|
||||
-- Name: log_registrant_verifications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER SEQUENCE log_registrant_verifications_id_seq OWNED BY log_registrant_verifications.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: log_registrars; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
@ -2408,30 +2024,7 @@ CREATE TABLE log_registrars (
|
|||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
name character varying,
|
||||
reg_no character varying,
|
||||
vat_no character varying,
|
||||
billing_address character varying,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
creator_str character varying,
|
||||
updator_str character varying,
|
||||
phone character varying,
|
||||
email character varying,
|
||||
billing_email character varying,
|
||||
country_code character varying,
|
||||
state character varying,
|
||||
city character varying,
|
||||
street character varying,
|
||||
zip character varying,
|
||||
code character varying,
|
||||
url character varying,
|
||||
directo_handle character varying,
|
||||
vat boolean,
|
||||
legacy_id integer,
|
||||
reference_no character varying
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -2468,13 +2061,7 @@ CREATE TABLE log_reserved_domains (
|
|||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
creator_str character varying,
|
||||
updator_str character varying,
|
||||
names hstore
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -2511,16 +2098,7 @@ CREATE TABLE log_settings (
|
|||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
var character varying,
|
||||
value text,
|
||||
thing_id integer,
|
||||
thing_type character varying,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
creator_str character varying,
|
||||
updator_str character varying
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -2557,33 +2135,7 @@ CREATE TABLE log_users (
|
|||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
username character varying,
|
||||
password character varying,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
email character varying,
|
||||
sign_in_count integer,
|
||||
current_sign_in_at timestamp without time zone,
|
||||
last_sign_in_at timestamp without time zone,
|
||||
current_sign_in_ip inet,
|
||||
last_sign_in_ip inet,
|
||||
identity_code character varying,
|
||||
roles character varying[],
|
||||
creator_str character varying,
|
||||
updator_str character varying,
|
||||
country_code character varying,
|
||||
registrar_id integer,
|
||||
active boolean,
|
||||
csr text,
|
||||
crt text,
|
||||
type character varying,
|
||||
registrant_ident character varying,
|
||||
encrypted_password character varying,
|
||||
remember_created_at timestamp without time zone,
|
||||
failed_attempts integer,
|
||||
locked_at timestamp without time zone
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -2620,16 +2172,7 @@ CREATE TABLE log_white_ips (
|
|||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
registrar_id integer,
|
||||
ipv4 character varying,
|
||||
ipv6 character varying,
|
||||
interfaces character varying[],
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
creator_str character varying,
|
||||
updator_str character varying
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -2666,23 +2209,7 @@ CREATE TABLE log_zonefile_settings (
|
|||
object_changes json,
|
||||
created_at timestamp without time zone,
|
||||
session character varying,
|
||||
children json,
|
||||
log_id integer,
|
||||
origin character varying,
|
||||
ttl integer,
|
||||
refresh integer,
|
||||
retry integer,
|
||||
expire integer,
|
||||
minimum_ttl integer,
|
||||
email character varying,
|
||||
master_nameserver character varying,
|
||||
log_created_at timestamp without time zone,
|
||||
log_updated_at timestamp without time zone,
|
||||
creator_str character varying,
|
||||
updator_str character varying,
|
||||
ns_records text,
|
||||
a_records text,
|
||||
a4_records text
|
||||
children json
|
||||
);
|
||||
|
||||
|
||||
|
@ -2718,8 +2245,8 @@ CREATE TABLE mail_templates (
|
|||
cc character varying,
|
||||
body text NOT NULL,
|
||||
text_body text NOT NULL,
|
||||
created_at timestamp without time zone NOT NULL,
|
||||
updated_at timestamp without time zone NOT NULL
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone
|
||||
);
|
||||
|
||||
|
||||
|
@ -3131,7 +2658,8 @@ CREATE TABLE users (
|
|||
encrypted_password character varying DEFAULT ''::character varying NOT NULL,
|
||||
remember_created_at timestamp without time zone,
|
||||
failed_attempts integer DEFAULT 0 NOT NULL,
|
||||
locked_at timestamp without time zone
|
||||
locked_at timestamp without time zone,
|
||||
legacy_id integer
|
||||
);
|
||||
|
||||
|
||||
|
@ -3605,13 +3133,6 @@ ALTER TABLE ONLY log_keyrelays ALTER COLUMN id SET DEFAULT nextval('log_keyrelay
|
|||
ALTER TABLE ONLY log_legal_documents ALTER COLUMN id SET DEFAULT nextval('log_legal_documents_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY log_mail_templates ALTER COLUMN id SET DEFAULT nextval('log_mail_templates_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
|
@ -3633,13 +3154,6 @@ ALTER TABLE ONLY log_nameservers ALTER COLUMN id SET DEFAULT nextval('log_namese
|
|||
ALTER TABLE ONLY log_pricelists ALTER COLUMN id SET DEFAULT nextval('log_pricelists_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY log_registrant_verifications ALTER COLUMN id SET DEFAULT nextval('log_registrant_verifications_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
|
@ -4139,14 +3653,6 @@ ALTER TABLE ONLY log_legal_documents
|
|||
ADD CONSTRAINT log_legal_documents_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: log_mail_templates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY log_mail_templates
|
||||
ADD CONSTRAINT log_mail_templates_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: log_messages_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
@ -4171,14 +3677,6 @@ ALTER TABLE ONLY log_pricelists
|
|||
ADD CONSTRAINT log_pricelists_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: log_registrant_verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY log_registrant_verifications
|
||||
ADD CONSTRAINT log_registrant_verifications_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: log_registrars_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
@ -4865,20 +4363,6 @@ CREATE INDEX index_log_legal_documents_on_item_type_and_item_id ON log_legal_doc
|
|||
CREATE INDEX index_log_legal_documents_on_whodunnit ON log_legal_documents USING btree (whodunnit);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_log_mail_templates_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
CREATE INDEX index_log_mail_templates_on_item_type_and_item_id ON log_mail_templates USING btree (item_type, item_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_log_mail_templates_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
CREATE INDEX index_log_mail_templates_on_whodunnit ON log_mail_templates USING btree (whodunnit);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_log_messages_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
@ -4907,20 +4391,6 @@ CREATE INDEX index_log_nameservers_on_item_type_and_item_id ON log_nameservers U
|
|||
CREATE INDEX index_log_nameservers_on_whodunnit ON log_nameservers USING btree (whodunnit);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_log_registrant_verifications_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
CREATE INDEX index_log_registrant_verifications_on_item_type_and_item_id ON log_registrant_verifications USING btree (item_type, item_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_log_registrant_verifications_on_whodunnit; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
CREATE INDEX index_log_registrant_verifications_on_whodunnit ON log_registrant_verifications USING btree (whodunnit);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_log_registrars_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
@ -5461,6 +4931,8 @@ INSERT INTO schema_migrations (version) VALUES ('20150803080914');
|
|||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150810114746');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150810114747');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150825125118');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150827151906');
|
||||
|
@ -5471,15 +4943,9 @@ INSERT INTO schema_migrations (version) VALUES ('20150910113839');
|
|||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150915094707');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150918135710');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150918140948');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150918142422');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150921110152');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150921111842');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20151028183132');
|
||||
INSERT INTO schema_migrations (version) VALUES ('20151029152638');
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ namespace :import do
|
|||
desc 'Import all'
|
||||
task all: :environment do
|
||||
Rake::Task['import:registrars'].invoke
|
||||
Rake::Task['import:users'].invoke
|
||||
Rake::Task['import:contacts'].invoke
|
||||
Rake::Task['import:domains'].invoke
|
||||
Rake::Task['import:zones'].invoke
|
||||
|
@ -123,6 +124,45 @@ namespace :import do
|
|||
puts "-----> Imported #{count} new registrars in #{(Time.zone.now.to_f - start).round(2)} seconds"
|
||||
end
|
||||
|
||||
desc 'Import users'
|
||||
task users: :environment do
|
||||
start = Time.zone.now.to_f
|
||||
puts '-----> Importing users...'
|
||||
|
||||
users = []
|
||||
ips = []
|
||||
|
||||
existing_ids = ApiUser.pluck(:legacy_id)
|
||||
|
||||
count = 0
|
||||
|
||||
Legacy::Registrar.all.each do |x|
|
||||
|
||||
next if existing_ids.include?(x.id)
|
||||
count += 1
|
||||
|
||||
users << ApiUser.new({
|
||||
username: x.handle.try(:strip),
|
||||
password: x.acl.try(:password),
|
||||
registrar_id: Registrar.find_by(legacy_id: x.try(:id)).try(:id),
|
||||
legacy_id: x.try(:id)
|
||||
})
|
||||
|
||||
if x.acl.try(:ipaddr)
|
||||
ips << WhiteIp.new({
|
||||
registrar_id: Registrar.find_by(legacy_id: x.try(:id)).try(:id),
|
||||
ipv4: x.acl.try(:ipaddr)
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
ApiUser.import users, validate: false
|
||||
if ips
|
||||
WhiteIp.import ips, validate: false
|
||||
end
|
||||
puts "-----> Imported #{count} new users in #{(Time.zone.now.to_f - start).round(2)} seconds"
|
||||
end
|
||||
|
||||
desc 'Import contacts'
|
||||
task contacts: :environment do
|
||||
start = Time.zone.now.to_f
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue