stacks-core icon indicating copy to clipboard operation
stacks-core copied to clipboard

Update SQLITE Version to support `STRICT` tables

Open ASuciuX opened this issue 9 months ago • 1 comments

According to the docs, the first sqlite_version that supports STRICT is 3.37.0. From the stacks-core, the sqlite_version is 3.33.0 and the tests were failing with this output:

Migrating chainstate schema from version 4 to 5: fix nakamoto tenure typo
thread 'chainstate::nakamoto::tests::test_make_miners_stackerdb_config' panicked at stackslib/src/net/mod.rs:2452:14:
called `Result::unwrap()` on an `Err` value: DBError(SqliteError(SqliteFailure(Error { code: Unknown, extended_code: 1 }, Some("near \"STRICT\": syntax error"))))

The rusqlite version has to be updated so that the sqlite used supports strict tables. The sqlite version can be checked in two ways:

  1. by running a query as displayed in this PR
  2. by importing the version from the rusqlite https://docs.rs/rusqlite/latest/rusqlite/fn.version.html

ASuciuX avatar May 28 '24 14:05 ASuciuX