Don't return the_geom column in the schema

1.0
Fernando Blat 14 years ago
parent 61e55651df
commit f2e5ffaa6d

@ -184,6 +184,7 @@ class Table < Sequel::Model(:user_tables)
schema = [schema] + temporal_schema
created_at = schema.delete([:created_at, "timestamp without time zone"])
updated_at = schema.delete([:updated_at, "timestamp without time zone"])
schema.delete([:the_geom, "geometry"])
if lat_column && lon_column
schema.each do |col|
col << "latitude" if col[0].to_sym == lat_column

@ -437,7 +437,7 @@ describe Table do
table.rows_counted.should == 5
table.schema.should == [[:cartodb_id, "integer"], [:id, "integer"], [:name, "character varying"], [:lat, "double precision"],
[:lon, "double precision"], [:the_geom, "geometry"], [:created_at, "timestamp"], [:updated_at, "timestamp"]
[:lon, "double precision"], [:created_at, "timestamp"], [:updated_at, "timestamp"]
]
row = table.to_json[:rows][0]
row[:cartodb_id].should == 1
@ -448,7 +448,7 @@ describe Table do
table.lat_column.should == :lat
table.lon_column.should == :lon
table.schema.should == [[:cartodb_id, "integer"], [:id, "integer"], [:name, "character varying"], [:lat, "double precision", "latitude"],
[:lon, "double precision", "longitude"], [:the_geom, "geometry"], [:created_at, "timestamp"], [:updated_at, "timestamp"]
[:lon, "double precision", "longitude"], [:created_at, "timestamp"], [:updated_at, "timestamp"]
]
# Vizzuality HQ

Loading…
Cancel
Save