Issue:
- ROWIDs in a SQLite table has been changed after executed a VACUUM command.
Reason:
- VACUUM command rebuilds the entire database, and recreates rowid for all tables.
Solution:
- Although query by ROWID could be fast, but it should not be used as an external key.
- Use an explicits integer primary key in the tables.
CREATE TABLE t(x INTEGER PRIMARY KEY ASC, y, z);