Modify seeds

This commit is contained in:
Martin Lensment 2014-10-14 12:48:19 +03:00
parent afb7f896fa
commit 48ef7b034a

View file

@ -14,28 +14,28 @@ zone = Registrar.where(
reg_no: '10577829', reg_no: '10577829',
address: 'Lõõtsa 2, Tallinna linn, Harju maakond, 11415', address: 'Lõõtsa 2, Tallinna linn, Harju maakond, 11415',
country: Country.first country: Country.first
).first_or_create! ).first_or_create
EppUser.where( EppUser.where(
username: 'zone', username: 'zone',
password: 'ghyt9e4fu', password: 'ghyt9e4fu',
active: true, active: true,
registrar: zone registrar: zone
).first_or_create! ).first_or_create
elkdata = Registrar.where( elkdata = Registrar.where(
name: 'Elkdata OÜ', name: 'Elkdata OÜ',
reg_no: '10510593', reg_no: '10510593',
address: 'Tondi 51-10, 11316 Tallinn', address: 'Tondi 51-10, 11316 Tallinn',
country: Country.first country: Country.first
).first_or_create! ).first_or_create
EppUser.where( EppUser.where(
username: 'elkdata', username: 'elkdata',
password: '8932iods', password: '8932iods',
active: true, active: true,
registrar: elkdata registrar: elkdata
).first_or_create! ).first_or_create
User.where( User.where(
username: 'gitlab', username: 'gitlab',
@ -44,7 +44,7 @@ User.where(
admin: true, admin: true,
identity_code: '37810013855', identity_code: '37810013855',
country: Country.where(name: 'Estonia').first country: Country.where(name: 'Estonia').first
).first_or_create! ).first_or_create
User.where( User.where(
username: 'zone', username: 'zone',
@ -52,9 +52,9 @@ User.where(
email: 'info-info@zone.ee', email: 'info-info@zone.ee',
admin: false, admin: false,
identity_code: '37810010085', identity_code: '37810010085',
registrar_id: zone.id, registrar_id: zone.id,
country: Country.where(name: 'Estonia').first country: Country.where(name: 'Estonia').first
).first_or_create! ).first_or_create
User.where( User.where(
username: 'elkdata', username: 'elkdata',
@ -64,4 +64,24 @@ User.where(
identity_code: '37810010727', identity_code: '37810010727',
registrar_id: elkdata.id, registrar_id: elkdata.id,
country: Country.where(name: 'Estonia').first 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
sg.settings = [s_1, s_2]
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