Open sphuber opened 1 month ago
Attention: Patch coverage is 83.67347%
with 8 lines
in your changes missing coverage. Please review.
Project coverage is 77.86%. Comparing base (
ef60b66
) to head (c2e565a
). Report is 30 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
src/aiida/storage/sqlite_dos/backend.py | 84.79% | 7 Missing :warning: |
src/aiida/storage/sqlite_zip/migrations/env.py | 0.00% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@sphuber I punted on reviewing this since afaik it's not a blocker for 2.6.0 release. LMK I case it became a priority, otherwise I'll get to it after 20th June, unless someone else reviews first.
Thanks @danielhollas . It is not critical for the release. Enjoy your holidays!
The majority of the
SqliteDosStorage
piggy-backs off of thePsqlDosStorage
plugin. It also uses thePsqlDosMigrator
as-is to perform the database migrations. This is not safe however, as PostgreSQL and SQLite do not have exactly the same syntax.An example is the
main_0002
revision which was added to drop the hashes of certain nodes. This uses the#-
operator which is JSONB specific syntax of PostgreSQL and is not supported by SQLite. Since this migration was added before theSqliteDosStorage
plugin was added, this has never caused a problems as all profiles would be new, would not have any nodes and therefore the SQL code of the migration would not actually be executed.In preparation for any future migrations that may need to be added, the
SqliteDosStorage
now uses theSqliteDosMigrator
. This subclasses thePsqlDosMigrator
as it can still use most of the functionality, but it changes a few critical things. Most notably the location of the schema versions which now are kept individually and are no longer lent from thecore.psql_dos
plugin. The exception is the original schema which is identical and so is symlinked.