From 1fa3a1a9ebbc392b8a0fb55db15e935dc410b4dd Mon Sep 17 00:00:00 2001 From: csd113 Date: Fri, 9 Oct 2026 07:56:04 -0700 Subject: [PATCH] Fix upgrade migration and prepare RustChan 1.7.1 --- CHANGELOG.md | 12 ++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 12 ++++++------ SETUP.md | 2 +- src/db/schema.rs | 9 +++++++-- 6 files changed, 28 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cbcc2af3..d501b29e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,18 @@ All notable changes to RustChan will be documented in this file. +## RustChan 1.7.1 — 2026-10-09 + +### Fixed + +- Fixed startup migration from earlier release databases, including 1.6.6, by recognizing the additive `idx_reports_reporter_created` index. The missing allowlist entry previously prevented all recognized 1.7.0 schema repairs and caused startup to fail. +- Expanded the upgrade regression fixture to cover the earlier report index, thread ordering index and submission-receipt schema together, while verifying preserved live receipts, deletion history and repeated startup. + +### Upgrade notes + +- Back up the complete data directory before upgrading. Database schema versions continue to match the RustChan package release: successful 1.7.1 startup verifies the full schema before recording `1.7.1`. Existing content and administrator records are retained; unknown schema drift remains rejected. +- This release replaces 1.7.0 as the stable release. The earlier 1.7.0 release is retained as a prerelease because of its upgrade migration failure. + ## RustChan 1.7.0 — 2026-10-08 ### Upgrade notes diff --git a/Cargo.lock b/Cargo.lock index 5d3c6172..c6842b06 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4631,7 +4631,7 @@ dependencies = [ [[package]] name = "rustchan" -version = "1.7.0" +version = "1.7.1" dependencies = [ "anyhow", "argon2", diff --git a/Cargo.toml b/Cargo.toml index 454388a4..90d05a78 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rustchan" -version = "1.7.0" +version = "1.7.1" edition = "2021" # Rust 1.99 is the supported minimum for the package and build tooling. rust-version.workspace = true diff --git a/README.md b/README.md index 52ac3548..a9b1fcfd 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Conversations are organized into **boards** (topics such as photography or techn RustChan runs as a single app, with a built-in database. You do not need to set up a separate database server. -**Source version:** v1.7.0. **Downloads:** [latest published release](https://github.com/csd113/RustChan/releases/latest). **Docker image:** `ghcr.io/csd113/rustchan:latest`. +**Source version:** v1.7.1. **Downloads:** [latest published release](https://github.com/csd113/RustChan/releases/latest). **Docker image:** `ghcr.io/csd113/rustchan:latest`. ## Quick start @@ -70,14 +70,14 @@ For **Docker Compose, updates, backups, or a public website**, follow the [conta Open the [latest release](https://github.com/csd113/RustChan/releases/latest), download the ZIP for your operating system, and extract it into a folder where the app can save files. -ZIP names include the release version; the v1.7.0 names are shown below. Choose the matching files from the published release you download. +ZIP names include the release version; the v1.7.1 names are shown below. Choose the matching files from the published release you download. | Your computer | Download | |---|---| -| Linux, Intel or AMD 64-bit | `rustchan-cli-v1.7.0-linux-x86_64.zip` | -| Linux, ARM64 | `rustchan-cli-v1.7.0-linux-arm64.zip` | -| macOS, Apple silicon | `rustchan-cli-v1.7.0-macos-apple-silicon.zip` | -| Windows, Intel or AMD 64-bit | `rustchan-cli-v1.7.0-windows-x86_64.zip` | +| Linux, Intel or AMD 64-bit | `rustchan-cli-v1.7.1-linux-x86_64.zip` | +| Linux, ARM64 | `rustchan-cli-v1.7.1-linux-arm64.zip` | +| macOS, Apple silicon | `rustchan-cli-v1.7.1-macos-apple-silicon.zip` | +| Windows, Intel or AMD 64-bit | `rustchan-cli-v1.7.1-windows-x86_64.zip` | From a terminal in the extracted folder, run: diff --git a/SETUP.md b/SETUP.md index 06baf820..22beddc2 100644 --- a/SETUP.md +++ b/SETUP.md @@ -2,7 +2,7 @@ Current setup and deployment guide for Linux, macOS, and Windows. -Current version: `1.7.0`. +Current version: `1.7.1`. This guide reflects the current RustChan architecture: diff --git a/src/db/schema.rs b/src/db/schema.rs index f9b93907..f8b27896 100644 --- a/src/db/schema.rs +++ b/src/db/schema.rs @@ -396,7 +396,7 @@ const INDEX_SCHEMA_SQL: &str = " /// Obsolete theme index accepted only during the known legacy repair path. const LEGACY_THEME_SORT_INDEX: &str = "idx_themes_enabled_sort"; /// Additive indexes introduced after the first package-version baseline. -const ADDITIVE_BASELINE_INDEXES: [&str; 12] = [ +const ADDITIVE_BASELINE_INDEXES: [&str; 13] = [ "idx_threads_active_order", "idx_posts_thread_live", "idx_posts_board_ip_created", @@ -407,6 +407,7 @@ const ADDITIVE_BASELINE_INDEXES: [&str; 12] = [ "idx_file_hashes_thumb_path", "idx_poll_options_poll_position", "idx_poll_votes_option_poll", + "idx_reports_reporter_created", "idx_ban_appeals_status_created", "idx_ban_appeals_ip_created", ]; @@ -3557,7 +3558,11 @@ mod tests { DROP INDEX idx_post_submissions_board; DROP INDEX idx_post_submissions_thread; DROP INDEX idx_post_submissions_post; - DROP TABLE post_submission_tombstones;")?; + DROP TABLE post_submission_tombstones; + DROP INDEX idx_reports_reporter_created; + DROP INDEX idx_threads_active_order; + CREATE INDEX idx_threads_board_sticky_bumped ON threads(board_id, sticky DESC, bumped_at DESC); + UPDATE schema_version SET version = '1.6.6';")?; install_or_migrate_schema(&conn)?; let receipt = crate::db::get_post_submission(&conn, "receipt", "actor", 1)? .context("preserved receipt")?;