Permalink
Browse files

mkdir db/migrate if not exist

  • Loading branch information...
1 parent 039ecaa commit 76ddfae820e7b1755e830eff0575ec73a800835a Richard committed Jul 27, 2009
Showing with 1 addition and 0 deletions.
  1. +1 −0 install.rb
View
@@ -13,6 +13,7 @@
puts "** Installing chinese_regions migrations"
migration_src_path = File.join(RAILS_ROOT, '/vendor/plugins/chinese_regions/generators/migrations/')
migration_dest_path = File.join(RAILS_ROOT, '/db/migrate/')
+FileUtils.mkdir(migration_dest_path) unless File.exists?(migration_dest_path)
['create_regions.rb', 'create_cities.rb', 'create_districts.rb'].each do |file|
FileUtils.cp(File.join(migration_src_path, file), File.join(migration_dest_path, Time.new.getutc.strftime("%Y%m%d%H%M%S") + "_" + file))
sleep 1

0 comments on commit 76ddfae

Please sign in to comment.