I have a PostGIS table with a column of type Geometry(POINT) and SRID 0 that must be changed to the type Geography(POINT) as it will be used to store lat/lon values.
How can we make this alteration to the table without dropping it?
Table was originally created using SQLAlchemy, Geoalchemy2 and Python, with the following model defination class:
class User(Base):
__tablename__ = 'users'
id = Column(Integer, primary_key=True)
name = Column(String())
coordinates = Column(Geometry('POINT'))
which should now be changed to
class User(Base):
__tablename__ = 'users'
id = Column(Integer, primary_key=True)
name = Column(String())
coordinates = Column(Geography('POINT'))