[PR #379] [CLOSED] FTS5 migration #580

Closed
opened 2026-02-25 23:34:47 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-shiori/shiori/pull/379
Author: @fmartingr
Created: 2/22/2022
Status: Closed

Base: masterHead: fix/fts5-migration


📝 Commits (1)

📊 Changes

1 file changed (+61 additions, -1 deletions)

View changed files

📝 internal/database/sqlite.go (+61 -1)

📄 Description

An attempt to migrate the pre 1.5.1 bookmark_content table from FTS4 to FTS5. Since alters can't be performed on virtual tables we need to manually copy all content from one table to another.

A simple query will be made to check if the table is still fts4 (which means it predates 1.5.1) and the process will happen on the first run using 1.5.1. After that, table will be migrated and the query should not cause much overhead, at least until we implement proper migrations (#270) or an ORM (also with migrations).

This PR only affects SQLite.

Fixes #377


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-shiori/shiori/pull/379 **Author:** [@fmartingr](https://github.com/fmartingr) **Created:** 2/22/2022 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix/fts5-migration` --- ### 📝 Commits (1) - [`f8a2915`](https://github.com/go-shiori/shiori/commit/f8a29159ba9afc3e836aa7bfd00b14edaae9ab68) wip: fts5 migration ### 📊 Changes **1 file changed** (+61 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `internal/database/sqlite.go` (+61 -1) </details> ### 📄 Description An attempt to migrate the pre 1.5.1 `bookmark_content` table from FTS4 to FTS5. Since alters can't be performed on virtual tables we need to manually copy all content from one table to another. A simple query will be made to check if the table is still fts4 (which means it predates 1.5.1) and the process will happen on the first run using 1.5.1. After that, table will be migrated and the query should not cause much overhead, at least until we implement proper migrations (#270) or an ORM (also with migrations). This PR **only affects SQLite**. Fixes #377 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 23:34:47 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#580
No description provided.