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
This commit is contained in:
parent
5ca925996d
commit
f90d76aa18
1 changed files with 9 additions and 1 deletions
|
|
@ -50,11 +50,19 @@ def run_migrations_offline():
|
|||
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():
|
||||
|
|
|
|||
Loading…
Reference in a new issue