diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-01-14 10:06:22 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-01-14 10:13:04 +0100 |
| commit | 8de88b5c7c41bc16a8f6979b69bbd94b7fb9b5cd (patch) | |
| tree | dff46c9dd3cd1f5cee05b7b397e134fec8f5c4cc /crates/cli/src/init.rs | |
| parent | d72440ead7be71bd025a6b893dcd546d6d5a43bb (diff) | |
| download | mihi-8de88b5c7c41bc16a8f6979b69bbd94b7fb9b5cd.tar.gz mihi-8de88b5c7c41bc16a8f6979b69bbd94b7fb9b5cd.zip | |
Migrate from usize to isize for integers in models
SQLite3, like many other DBs (e.g. PostgreSQL), assumes by default an
i64::MAX value. Hence, while in the application we are talking mainly in
unsigned terms (which is what makes sense here), this is not realistic
to what ends up happening on the DB side.
Up until now this just worked behind the scenes because rustqlite did
the heavy lifting via default trait implementations of usize which
handled this translation for us. This default implementation for usize
was dropped in 0.38.0 (see [1]). Even if it can be enabled back via the
"fallible_uint" feature, it's more fair to stick to isize, as it's not
much of a problem on our side, and it's more transparent in regards to
what happens in the end in the DB.
Last but not least, this commit also upgrades rustqlite to the latest
0.38.0, with the rest of the dependency tree.
[1] https://github.com/rusqlite/rusqlite/issues/1722)
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'crates/cli/src/init.rs')
0 files changed, 0 insertions, 0 deletions
