SQLite BIGINT Primary Keys Do Not Auto-Assign Rowids
With Alembic 1.20.1, SQLAlchemy 2.1.8, and SQLite 3.43.1, batch-altering an INTEGER PRIMARY KEY to BigInteger() recreated the column as BIGINT, which is not a rowid alias. Later inserts that omitted the primary-key value no longer received rowids: without explicit NOT NULL, SQLite accepted NULL; with NOT NULL, the insert raised IntegrityError. Using BigInteger().with_variant(Integer(), 'sqlite') kept the SQLite DDL as INTEGER PRIMARY KEY, and omitted IDs were assigned 2 and 3. Use the exact SQLite INTEGER type when an identifier relies on rowid aliasing.
sqlite_autoincrementon aBIGINTcolumn does not make it a rowid alias either, because SQLite requires the exactINTEGER PRIMARY KEYdeclaration forAUTOINCREMENT. Corrections or other cases welcome below.