Skip to content

Commit d1f4c97

Browse files
authored
Merge pull request #9 from midwire/feature/3-remove-zipcode-county-relationship
Feature/3 remove zipcode county relationship
2 parents 1e9ec0f + 4c1577f commit d1f4c97

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

lib/free_zipcode_data/zipcode_table.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ def build
1010
id integer not null primary key,
1111
code varchar(10) not null,
1212
state_id integer,
13-
county_id integer,
1413
city varchar(255),
1514
area_code varchar(3),
1615
lat float,
@@ -31,14 +30,12 @@ def write(row)
3130
return nil unless row[:postal_code]
3231

3332
state_id = get_state_id(row[:short_state], row[:state])
34-
county_id = get_county_id(row[:county])
3533
city_name = escape_single_quotes(row[:city])
3634

3735
sql = <<-SQL
38-
INSERT INTO zipcodes (code, state_id, county_id, city, lat, lon, accuracy)
36+
INSERT INTO zipcodes (code, state_id, city, lat, lon, accuracy)
3937
VALUES ('#{row[:postal_code]}',
4038
'#{state_id}',
41-
'#{county_id}',
4239
'#{city_name}',
4340
'#{row[:latitude]}',
4441
'#{row[:longitude]}',

0 commit comments

Comments
 (0)