Add geometry field to PostGIS with Rails
问题 I have a database with a table called addresses. I want to add a geometry field. I could do it in pgAdmin, but not sure how it would play with Rails. I think sql would be: ALTER TABLE addresses ADD geom geometry(Point,4326) Then I will want to run UPDATE addresses SET geom = ST_SetSRID(ST_MakePoint(longitude,latitude),4326); Can I do that in Rails or must I do it in pgAdmin (or psql)? Thanks. Newbie getting lost in the complications of mashing several applications. 回答1: Are you using this gem