mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-20 07:24:23 +02:00
Rename the option to create-triggers for FTS.
This commit is contained in:
parent
3816556782
commit
d0658fda27
4 changed files with 7 additions and 7 deletions
|
|
@ -266,12 +266,12 @@ def create_index(path, table, column, name, unique, if_not_exists):
|
|||
@click.option("--fts4", help="Use FTS4", default=False, is_flag=True)
|
||||
@click.option("--fts5", help="Use FTS5", default=False, is_flag=True)
|
||||
@click.option(
|
||||
"--create-update-triggers",
|
||||
"--create-triggers",
|
||||
help="Create triggers to update the FTS tables when the parent table changes.",
|
||||
default=False,
|
||||
is_flag=True,
|
||||
)
|
||||
def enable_fts(path, table, column, fts4, fts5, create_update_triggers):
|
||||
def enable_fts(path, table, column, fts4, fts5, create_triggers):
|
||||
"Enable FTS for specific table and columns"
|
||||
fts_version = "FTS5"
|
||||
if fts4 and fts5:
|
||||
|
|
@ -282,7 +282,7 @@ def enable_fts(path, table, column, fts4, fts5, create_update_triggers):
|
|||
|
||||
db = sqlite_utils.Database(path)
|
||||
db[table].enable_fts(
|
||||
column, fts_version=fts_version, create_update_triggers=create_update_triggers
|
||||
column, fts_version=fts_version, create_triggers=create_triggers
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue