Primary keys are recycled after they are deleted
Ids are recycled in the database after they are deleted. This can lead to issues as #311 (closed). This is caused by the fact that only providing autoincrement=True
to SQLALchemy does not actually add the AUTOINCREMENT
keyword to an SQLite table. From #311 (closed):
SQLAlchemy requires the separate property
sqlite_autoincrement=True
to use the SQLite keywordAUTOINCREMENT
(https://docs.sqlalchemy.org/en/13/dialects/sqlite.html#using-the-autoincrement-keyword).However, SQLite itself discourages the use of the
AUTOINCREMENT
keyword (https://www.sqlite.org/autoinc.html).If we are going to add this keyword, we need a new migration which copies all the data to new tables, since SQLite does not support altering columns.
Should this be addressed or is it not really an issue?