# HG changeset patch # User Goffi # Date 1647964842 -3600 # Node ID 54c249ec35cebc9fec2376301bb97c844986f0ba # Parent bf0505d41c0908234f587a8442961ea0b9c5f01f 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 diff -r bf0505d41c09 -r 54c249ec35ce sat/memory/migration/env.py --- a/sat/memory/migration/env.py Tue Mar 22 17:00:42 2022 +0100 +++ b/sat/memory/migration/env.py Tue Mar 22 17:00:42 2022 +0100 @@ -50,11 +50,19 @@ context.run_migrations() +def include_name(name, type_, parent_names): + if type_ == "table": + if name.startswith("pubsub_items_fts"): + return False + return True + + def do_run_migrations(connection): context.configure( connection=connection, target_metadata=target_metadata, - render_as_batch=True + render_as_batch=True, + include_name=include_name ) with context.begin_transaction():