Open jace opened 9 years ago
I followed a Stackoverflow post regarding this issue, this could help I guess.
(http://stackoverflow.com/questions/27498991/sqlalchemy-primary-key-without-auto-increment):
$ geonameid = db.Column(db.Integer, primary_key=True, autoincrement=False)
This takes care of point 1. We also need a migration for point 2.
@jace we modify the generated migration (for point 1) by hand for point 2, right?
Try and see what you get. You need both forward and backward revisions.
SQLAlchemy provides an autoincrementing primary key by default (also referred to as "serial"). The
GeoName
table usesgeonameid
as the primary key and these numbers are externally defined, so the table should not have autoincrement enabled. We need to: