Skip to content

Remove broken DROP statements for SQLite in make_full_schema script. - #20028

Merged
reivilibre merged 2 commits into
developfrom
rei/mfs_sqlite_stopdrop
Aug 6, 2026
Merged

reivilibre merged 2 commits into
developfrom
rei/mfs_sqlite_stopdrop

Conversation

@reivilibre

Copy link
Copy Markdown
Contributor

Broken out of #20027 because I'd like to have it land first.

It seems a lot of time in our trial tests goes towards setting up the database. (The same is probably true of Complement too)

We haven't done a full schema for about 20 schema versions, so no surprise!

As a result, I want to produce a full schema soon.

When running make_full_schema.sh, these drop statements now cause the error:

Parse error near line 2: table event_search_content may not be dropped
Parse error near line 3: table event_search_segments may not be dropped
Parse error near line 4: table event_search_segdir may not be dropped
Parse error near line 5: table event_search_docsize may not be dropped
Parse error near line 6: table event_search_stat may not be dropped
Parse error near line 7: table user_directory_search_content may not be dropped
Parse error near line 8: table user_directory_search_segments may not be dropped
Parse error near line 9: table user_directory_search_segdir may not be dropped
Parse error near line 10: table user_directory_search_docsize may not be dropped
Parse error near line 11: table user_directory_search_stat may not be dropped

It seems SQLite has cracked down on code that edits the internal tables.

Because SQLite dumps the schema with CREATE TABLE IF NOT EXISTS for these virtual tables, it's harmless to leave them in the schema dump.

  1. make_full_schema: no longer drop sqlite internal tables

reivilibre and others added 2 commits July 31, 2026 17:01
Signed-off-by: Olivier 'reivilibre <oliverw@matrix.org>
@reivilibre
reivilibre marked this pull request as ready for review July 31, 2026 17:05
@reivilibre
reivilibre requested a review from a team as a code owner July 31, 2026 17:05
@reivilibre
reivilibre merged commit 320265f into develop Aug 6, 2026
37 checks passed
@reivilibre
reivilibre deleted the rei/mfs_sqlite_stopdrop branch August 6, 2026 09:15
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.

3 participants