From e051ba6bbf0af7b9da4902d8a64bdfd73bfa54b4 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 17 Jul 2025 13:18:34 +0930 Subject: [PATCH] sqlite3: consistently comment where we want to upgrade. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now you can grep for 'sqlite3 version' and see where we would like to update. Debian 11 (Bullseye) and Ubuntu 20.04 (Focal) ship with SQLite 3.31.1. RHEL 9 ships with 3.34.1. Fedora 38+ uses SQLite 3.40+. Unfortunately, RHEL8 ships with 3.26.0, and is still on maintenance Support (security fixes, no new features): runs until May 31, 2029. Signed-off-by: Rusty Russell --- db/db_sqlite3.c | 1 + plugins/sql.c | 4 ++-- wallet/db.c | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/db/db_sqlite3.c b/db/db_sqlite3.c index 876049ed3..8ee380a63 100644 --- a/db/db_sqlite3.c +++ b/db/db_sqlite3.c @@ -570,6 +570,7 @@ static bool complete_table_manip(struct db *db, return true; } +/* FIXME: sqlite3 version 3.25.0 (2018-09-15) supports ALTER TABLE RENAME */ static bool db_sqlite3_rename_column(struct db *db, const char *tablename, const char *from, const char *to) diff --git a/plugins/sql.c b/plugins/sql.c index 1496d7e9c..9e4ca305b 100644 --- a/plugins/sql.c +++ b/plugins/sql.c @@ -873,8 +873,8 @@ static struct command_result *channels_refresh(struct command *cmd, plugin_log(cmd->plugin, LOG_DBG, "Refreshing channel: %s", fmt_short_channel_id(tmpctx, scid)); - /* FIXME: sqlite 3.24.0 (2018-06-04) added UPSERT, but - * we don't require it. */ + /* FIXME: sqlite3 version 3.24.0 (2018-06-04) added + * UPSERT, but we don't require it. */ delete_channel_from_db(cmd, scid); req = jsonrpc_request_start(cmd, "listchannels", listchannels_one_done, diff --git a/wallet/db.c b/wallet/db.c index 569182d5e..93707eb8f 100644 --- a/wallet/db.c +++ b/wallet/db.c @@ -1631,8 +1631,8 @@ static void migrate_channels_scids_as_integers(struct lightningd *ld, /* FIXME: We cannot use ->delete_columns to remove * short_channel_id, as other tables reference the channels * (and sqlite3 has them referencing a now-deleted table!). - * When we can assume sqlite3 2021-04-19 (3.35.5), we can - * simply use DROP COLUMN (yay!) */ + * When we can assume sqlite3 version 3.35.5 (2021-04-19), + * we can simply use DROP COLUMN (yay!) */ /* So null-out the unused column, at least! */ stmt = db_prepare_v2(db, SQL("UPDATE channels"