mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-19 06:54:25 +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
|
|
@ -710,7 +710,7 @@ class Table(Queryable):
|
|||
)
|
||||
self.db.add_foreign_keys([(self.name, column, other_table, other_column)])
|
||||
|
||||
def enable_fts(self, columns, fts_version="FTS5", create_update_triggers=False):
|
||||
def enable_fts(self, columns, fts_version="FTS5", create_triggers=False):
|
||||
"Enables FTS on the specified columns."
|
||||
sql = """
|
||||
CREATE VIRTUAL TABLE "{table}_fts" USING {fts_version} (
|
||||
|
|
@ -725,7 +725,7 @@ class Table(Queryable):
|
|||
self.db.conn.executescript(sql)
|
||||
self.populate_fts(columns)
|
||||
|
||||
if create_update_triggers:
|
||||
if create_triggers:
|
||||
old_cols = ", ".join("old.[{}]".format(c) for c in columns)
|
||||
new_cols = ", ".join("new.[{}]".format(c) for c in columns)
|
||||
triggers = """
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue