lib/generators/china_regions/templates/migration.rb in china_regions-0.0.5 vs lib/generators/china_regions/templates/migration.rb in china_regions-0.1.0

- old
+ new

@@ -7,16 +7,16 @@ t.string :name t.string :name_en t.string :name_abbr t.timestamps end - + add_index :provinces, :name add_index :provinces, :name_en add_index :provinces, :name_abbr end - + unless table_exists? 'cities' create_table :cities do |t| t.string :name t.integer :province_id t.integer :level @@ -30,11 +30,11 @@ add_index :cities, :level add_index :cities, :zip_code add_index :cities, :name_en add_index :cities, :name_abbr end - + unless table_exists? 'districts' create_table :districts do |t| t.string :name t.integer :city_id t.string :name_en @@ -45,6 +45,6 @@ add_index :districts, :city_id add_index :districts, :name_en add_index :districts, :name_abbr end end -end \ No newline at end of file +end