Skip to content

Fix database migrations failing on platforms where SQLite is configured with SQLITE_DBCONFIG_DEFENSIVE by default, such as macOS.#19690

Merged
reivilibre merged 3 commits intodevelopfrom
rei/sqlite_defensive
Apr 15, 2026
Merged

Fix database migrations failing on platforms where SQLite is configured with SQLITE_DBCONFIG_DEFENSIVE by default, such as macOS.#19690
reivilibre merged 3 commits intodevelopfrom
rei/sqlite_defensive

Conversation

@reivilibre
Copy link
Copy Markdown
Contributor

@reivilibre reivilibre commented Apr 14, 2026

Fixes: #19616

This caused 2+ people trouble now, so worth batting away with a low-effort change if we can.

Only seen on macOS so far, but nothing stops SQLite being configured in defensive mode by default on other platforms, so it is not necessarily entirely specific to macOS.

We could also do this for Python < 3.12 but it'd be more effort and I don't know if it's worth it.


(For context @kegsay says the interpreter with this problem was installed through pyenv install.)

@reivilibre reivilibre merged commit 943da0a into develop Apr 15, 2026
46 of 48 checks passed
@reivilibre reivilibre deleted the rei/sqlite_defensive branch April 15, 2026 15:55
```

This example uses python 3.13, but choose whichever version you want.

Copy link
Copy Markdown
Contributor

@MadLittleMods MadLittleMods Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is removing the workaround docs from #19615

(no longer necessary)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Synapse writes to sqlite_master which is forbidden with some configurations of SQLite, such as on macOS

2 participants