Merge branch 'master' of github.com:internetee/registry

Conflicts:
	app/models/contact.rb
	db/schema.rb
This commit is contained in:
Andres Keskküla 2014-10-15 11:06:31 +03:00
commit 897ead3391
66 changed files with 1173 additions and 409 deletions

View file

@ -0,0 +1,9 @@
class AddDnskeySettings < ActiveRecord::Migration
def change
sg = SettingGroup.create(code: 'dnskeys')
sg.settings << Setting.create(code: Setting::DS_ALGORITHM, value: 1)
sg.settings << Setting.create(code: Setting::ALLOW_DS_DATA, value: 1)
sg.settings << Setting.create(code: Setting::ALLOW_DS_DATA_WITH_KEYS, value: 1)
sg.settings << Setting.create(code: Setting::ALLOW_KEY_DATA, value: 1)
end
end

View file

@ -0,0 +1,11 @@
class CreateDelegationSigner < ActiveRecord::Migration
def change
create_table :delegation_signers do |t|
t.integer :domain_id
t.string :key_tag
t.integer :alg
t.integer :digest_type
t.string :digest
end
end
end

View file

@ -0,0 +1,5 @@
class AddDelegationSignerToDnskey < ActiveRecord::Migration
def change
add_column :dnskeys, :delegation_signer_id, :integer
end
end

View file

@ -0,0 +1,9 @@
class AddDsFileldsToDnskey < ActiveRecord::Migration
def change
add_column :dnskeys, :ds_key_tag, :string
add_column :dnskeys, :ds_alg, :integer
add_column :dnskeys, :ds_digest_type, :integer
add_column :dnskeys, :ds_digest, :string
end
end

View file

@ -0,0 +1,5 @@
class ChangePublicKeyTypeToText < ActiveRecord::Migration
def change
change_column :dnskeys, :public_key, :text
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: 20141010085152) do
ActiveRecord::Schema.define(version: 20141014073435) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -91,12 +91,25 @@ ActiveRecord::Schema.define(version: 20141010085152) do
t.datetime "updated_at"
end
create_table "delegation_signers", force: true do |t|
t.integer "domain_id"
t.string "key_tag"
t.integer "alg"
t.integer "digest_type"
t.string "digest"
end
create_table "dnskeys", force: true do |t|
t.integer "domain_id"
t.integer "flags"
t.integer "protocol"
t.integer "alg"
t.string "public_key"
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"
end
create_table "domain_contacts", force: true do |t|

View file

@ -14,28 +14,28 @@ zone = Registrar.where(
reg_no: '10577829',
address: 'Lõõtsa 2, Tallinna linn, Harju maakond, 11415',
country: Country.first
).first_or_create!
).first_or_create
EppUser.where(
username: 'zone',
username: 'zone',
password: 'ghyt9e4fu',
active: true,
registrar: zone
).first_or_create!
).first_or_create
elkdata = Registrar.where(
name: 'Elkdata OÜ',
reg_no: '10510593',
address: 'Tondi 51-10, 11316 Tallinn',
country: Country.first
).first_or_create!
).first_or_create
EppUser.where(
username: 'elkdata',
password: '8932iods',
active: true,
registrar: elkdata
).first_or_create!
).first_or_create
User.where(
username: 'gitlab',
@ -44,7 +44,7 @@ User.where(
admin: true,
identity_code: '37810013855',
country: Country.where(name: 'Estonia').first
).first_or_create!
).first_or_create
User.where(
username: 'zone',
@ -52,9 +52,9 @@ User.where(
email: 'info-info@zone.ee',
admin: false,
identity_code: '37810010085',
registrar_id: zone.id,
registrar_id: zone.id,
country: Country.where(name: 'Estonia').first
).first_or_create!
).first_or_create
User.where(
username: 'elkdata',
@ -64,4 +64,29 @@ User.where(
identity_code: '37810010727',
registrar_id: elkdata.id,
country: Country.where(name: 'Estonia').first
).first_or_create!
).first_or_create
sg = SettingGroup.where(code: 'domain_validation').first_or_create
s_1 = Setting.where(code: 'ns_min_count').first_or_create
s_1.value = 1
s_2 = Setting.where(code: 'ns_max_count').first_or_create
s_2.value = 13
s_3 = Setting.where(code: 'dnskeys_min_count').first_or_create
s_3.value = 0
s_4 = Setting.where(code: 'dnskeys_max_count').first_or_create
s_4.value = 9
sg.settings = [s_1, s_2, s_3, s_4]
sg.save
sg = SettingGroup.where(code: 'domain_general').first_or_create
s_1 = Setting.where(code: 'transfer_wait_time').first_or_create
s_1.value = 0
sg.settings = [s_1]
sg.save