agenda-libre-ruby/db/migrate/20170701161358_add_lu_and_t...

13 lines
394 B
Ruby

# Add the new countries Luxembourg and Tunisia
class AddLuAndTn < ActiveRecord::Migration
def self.up
say 'Creates LU and TN regions'
return if Region.exists? name: 'Luxembourg'
[
{ name: 'Luxembourg', code: :LU, url: '//www.agendadulibre.org' },
{ name: 'Tunisie', code: :TN, url: '//www.agendadulibre.org' }
].each { |country| Region.create country }
end
end