libervia-backend/libervia/backend/memory/migration/versions
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Goffi a8348576ae core: get rid of pickle:
Use of `pickle` to serialise data was a technical legacy that was causing trouble to store
in database, to update (if a class was serialised, a change could break update), and to
security (pickle can lead to code execution).

This patch remove all use of Pickle in favour in JSON, notably:
- for caching data, a Pydantic model is now used instead
- for SQLAlchemy model, the LegacyPickle is replaced by JSON serialisation
- in XEP-0373 a class `PublicKeyMetadata` was serialised. New method `from_dict` and
  `to_dict` method have been implemented to do serialisation.
- new methods to (de)serialise data can now be specified with Identity data types. It is
  notably used to (de)serialise `path` of avatars.

A migration script has been created to convert data (for upgrade or downgrade), with
special care for XEP-0373 case. Depending of size of database, this migration script can
be long to run.

rel 443
2024-02-23 13:31:04 +01:00
..
2ab01aa1f686_create_table_for_notifications.py core: notifications implementation, first draft: 2023-10-16 17:29:31 +02:00
4b002773cf92_add_origin_id_column_to_history_and_.py refactoring: renamed sat package to libervia.backend 2023-06-02 11:49:51 +02:00
79e5f3313fa4_create_table_for_pubsub_subscriptions.py refactoring: renamed sat package to libervia.backend 2023-06-02 11:49:51 +02:00
129ac51807e4_create_virtual_table_for_full_text_.py refactoring: renamed sat package to libervia.backend 2023-06-02 11:49:51 +02:00
602caf848068_drop_message_types_table_fix_nullable.py refactoring: renamed sat package to libervia.backend 2023-06-02 11:49:51 +02:00
8974efc51d22_create_tables_for_pubsub_caching.py refactoring: renamed sat package to libervia.backend 2023-06-02 11:49:51 +02:00
610345f77e75_add_version_id_to_history.py core (memory/sqla_mapping): add a version_id column to detect race conditions. 2023-11-22 14:52:00 +01:00
__init__.py refactoring: renamed sat package to libervia.backend 2023-06-02 11:49:51 +02:00
fe3a02cb4bec_convert_legacypickle_columns_to_json.py core: get rid of pickle: 2024-02-23 13:31:04 +01:00