Im working on a pos system based on sqlite. One table contains all orders/buys. Every night the system should copy all orders to an different table in a different database, because otherwise the orders table will become too heavy (monthly about 15000 new rows) and the whole system will become too slow.
My problem is, that when i copy the daily orders into the backup database, im loosing my last autoincrement value. That means: sqlite is starting again with 1. But i need a unique ID for the orders over 2 databases/tables?
Does somebody has an idea, how i can force sqlite to not reset the last autoincrement value, when deleting all rows?