Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sqlite3: fix error when dropping db with system tables
In some cases SQLite creates new tables for internal use. The names of these internal schema objects[0] always begin with `sqlite_` and are not to be touched by applications. Example case: if column declaration uses `AUTOINCREMENT` keyword, a new column is created into table `sqlite_sequence` which can not be dropped. Currently, `sqlite3.Drop()` resolves tables to be dropped by querying table `sqlite_master` for all tables in the database. However, this query also returns aforementioned `sqlite_sequence` table. This commit adds a filter to the query resolving tables to be dropped. Filter removes tables starting with `sqlite_` from the query results. [0]: https://www.sqlite.org/fileformat2.html#intschema
- Loading branch information