SharpZones
导入省市区数据库
Installation
Add this line to your application's Gemfile:
gem 'sharp_zones'
And then execute:
bundle
Usage
rails g sharp_zones install
rake db:migrate
rake sharp_zones:import
Sqlite Table Struct
sqlite> PRAGMA table_info(T_Province);
0|ProName|varchar(50)|1||1
1|ProSort|TEXT|0||0
2|ProRemark|varchar(50)|0||0
sqlite> PRAGMA table_info(T_City);
0|CityName|varchar(50)|1||0
1|ProID|TEXT|0||0
2|CitySort|TEXT|0||1
sqlite> PRAGMA table_info(T_Zone);
0|ZoneID|INTEGER|1||1
1|ZoneName|TEXT|0||0
2|CityID|TEXT|0||0
LICENSE.
This project rocks and uses MIT-LICENSE.