atk4 / data

Data Access PHP Framework for SQL & high-latency databases
https://atk4-data.readthedocs.io
MIT License
271 stars 46 forks source link

SQLite must keep AI incremented after rollback #1162

Closed mvorisek closed 6 months ago

mvorisek commented 6 months ago

related discussion: https://stackoverflow.com/questions/692856/set-start-value-for-autoincrement-in-sqlite

needed for https://github.com/atk4/ui/pull/2032

mvorisek commented 6 months ago

It seems the only way is to increment the AI counters before any rollback/savepoint rollback - https://dbfiddle.uk/6Fbnb-b5