mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 16:02:03 +02:00
Contact creation improvements
This commit is contained in:
parent
acb65c47d6
commit
6a456240fa
7 changed files with 39 additions and 7 deletions
5
db/migrate/20140702144833_countries_table_rename.rb
Normal file
5
db/migrate/20140702144833_countries_table_rename.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class CountriesTableRename < ActiveRecord::Migration
|
||||
def change
|
||||
rename_table :country_id, :countries
|
||||
end
|
||||
end
|
5
db/migrate/20140702145448_address_column_rename.rb
Normal file
5
db/migrate/20140702145448_address_column_rename.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class AddressColumnRename < ActiveRecord::Migration
|
||||
def change
|
||||
rename_column :addresses, :address, :street
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20140701130945) do
|
||||
ActiveRecord::Schema.define(version: 20140702145448) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
@ -20,7 +20,7 @@ ActiveRecord::Schema.define(version: 20140701130945) do
|
|||
t.integer "contact_id"
|
||||
t.integer "country_id"
|
||||
t.string "city"
|
||||
t.string "address"
|
||||
t.string "street"
|
||||
t.string "zip"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
|
@ -38,7 +38,7 @@ ActiveRecord::Schema.define(version: 20140701130945) do
|
|||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "country_id", force: true do |t|
|
||||
create_table "countries", force: true do |t|
|
||||
t.string "iso"
|
||||
t.string "name"
|
||||
t.datetime "created_at"
|
||||
|
|
|
@ -5,3 +5,6 @@
|
|||
#
|
||||
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
|
||||
# Mayor.create(name: 'Emanuel', city: cities.first)
|
||||
|
||||
Country.where(name: 'Estonia', iso: 'EE').first_or_create
|
||||
EppUser.where(username: 'gitlab', password: 'ghyt9e4fu', active: true).first_or_create
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue