Following code is not resetting/clearing the auto increment id to 0
database = Room.databaseBuilder(getApplicationContext(), AppDatabase.class, DatabaseMeta.DB_NAME)
.build();
database.query("DELETE FROM sqlite_sequence WHERE name = ?", new Object[]{"tableName"});
or
database.query("REPLACE INTO sqlite_sequence (name, seq) VALUES ('mission', -1)", null);
Is there anyway to clear sqlite_sequence
in Android room?
Android room is not using "sqlite_sequence" for auto increment logic i think, not sure. Tried printing sqlite_sequence
entries, can't find the table name i used(which has the auto increment primary key).