Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix enable_fts() when FTS table already exists without replace=True#709

Open
RamiNoodle733 wants to merge 1 commit intosimonw:mainfrom
RamiNoodle733:fix-fts-replace-issue-694
Open

Fix enable_fts() when FTS table already exists without replace=True#709
RamiNoodle733 wants to merge 1 commit intosimonw:mainfrom
RamiNoodle733:fix-fts-replace-issue-694

Conversation

Copy link

RamiNoodle733 commented Feb 7, 2026 *
edited by github-actions bot
Loading

When calling enable_fts() on a table that already has an FTS index, without passing replace=True, the function now returns early instead of attempting to create the table again and raising an sqlite3.OperationalError: table '{}_fts' already exists error.

Changes

  • Added check in enable_fts() to return early if FTS table exists and replace=False (the default)
  • Added regression test test_enable_fts_twice_without_replace()

Fixes #694


Documentation preview : https://sqlite-utils--709.org.readthedocs.build/en/709/

When calling enable_fts() on a table that already has an FTS index,
without passing replace=True, the function now returns early instead
of attempting to create the table again and raising an error.

Fixes simonw#694
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

sqlite-utils 4.0a1 enable_fts(replace=True): sqlite3.OperationalError: table "{}_fts" already exists

1 participant