prefer-identity
#
problemSerial types make permissions and schema management difficult. Identity columns are standard SQL and have more features and better usability.
#
solutionInstead of:
Use:
#
solution for alembic and sqlalchemyAs of sqlalchemy 1.4, use:
For sqlalchemy 1.3 or prior built-in support for rendering of IDENTITY
is not available yet,
however the following compilation hook may be used to replace occurrences of SERIAL
with IDENTITY
. See the SQLAlchemy docs for more information.