Did you check the entire table's dump? I have no idea if it is the same in SQLite, but in a "normal" relational database, a table-scan (where you have not done an order-by during retrieval of records) will not always be in primary key order. Often it will, but depending upon storage and fragmentation and many other items, keys do not 100% always flow in order. Obviously with an ORDER BY it would.
If some records were already in the target DB, of course, you could have PK collisions. Also could have issues if the import succeeded but the start of the counter was not updated to be greater than the highest imported key value. No idea how SQLite handles this either, but during bulk loads of the database it is not uncommon to have to seed the PK of the destination table to MAX([PKColumn]) + 1.
SQLite does some funny things in my little experience with it, which is why I dropped it for Postgre. That isn't perfect but it is much better.
Adam
Users browsing this forum: No registered users and 4 guests