Commit graph libervia-backend/sat/memory/migration
Author SHA1 Message Date
Goffi
317e8a6a94 core (memory/sqla): new table/mapping to handle Pubsub node subscriptions:
node subscriptions can now be cached, this can be useful for components which must keep
track of subscibers.

rel 364
2022-03-22 17:00:42 +01:00
Goffi
f90d76aa18 core (memory/migration): ignore FTS table when autogenerating script for migration:
SQLite Full-Text Search stable are not associated to Python object and can't be detected
by Alembic. To avoid the generation of unwanted drop commands, they are now ignored when
autogenerating migration scripts.

rel 364
2022-03-22 17:00:42 +01:00
Goffi
39bdd34d60 db (schema): create virtual table for FTS + migration
rel 361
2021-09-08 17:58:48 +02:00
Goffi
fdc44cdd49 migration: script to create pubsub caching tables 2021-07-29 22:50:57 +02:00
Goffi
a3e6425eb2 core (memory/sqla_mapping): fix some technical debt:
a first Alembic revision file is joined to migrate existing databases to new mapping.

This patch:
    - set `nullable=False` in various places
    - drop legacy `message_types` table, and use `Enum` instead
    - use naming convention, and get rid of anonymous constraint (this is the main reason
      why the revision file is so long)
2021-06-27 00:15:40 +02:00
Goffi
8ae38a1131 core (memory/sqla): database migration using Alembic:
Alembic database migration tool, which is the recommended one for SQLAlchemy has been
integrated. When a database is created, it will be used to stamp to current (head)
revision, otherwise, DB will be checked to see if it needs to be updated, and upgrade will
be triggered if necessary.
2021-06-25 17:55:23 +02:00