mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 09:43:36 +02:00
Registrar code data updates
This commit is contained in:
parent
767f7bb6df
commit
980f30b8de
2 changed files with 12 additions and 1 deletions
11
db/migrate/20150303151224_data_update_regisntrar_codes.rb
Normal file
11
db/migrate/20150303151224_data_update_regisntrar_codes.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
class DataUpdateRegisntrarCodes < ActiveRecord::Migration
|
||||
def change
|
||||
puts 'Registrar code updates:'
|
||||
Registrar.all.each do |r|
|
||||
next if r.code.present?
|
||||
r[:code] = r.name.parameterize
|
||||
puts "#{r.id}: #{r.changes.inspect}"
|
||||
r.save!
|
||||
end
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20150303130729) do
|
||||
ActiveRecord::Schema.define(version: 20150303151224) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue