[PR #3636] [MERGED] Remove retired SQL compatibility #6025

Closed
opened 2026-10-23 04:06:20 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3636
Author: @SpicyMarinara
Created: 7/15/2026
Status: ✅ Merged
Merged: 7/15/2026
Merged by: @SpicyMarinara

Base: staging ← Head: remove-sql-compatibility


📝 Commits (3)

  • d64c37e Remove retired SQL compatibility
  • 406e83d Apply CodeRabbit storage cleanup feedback
  • 37bb8f7 Enforce file-native unique keys

📊 Changes

106 files changed (+936 additions, -3416 deletions)

View changed files

📝 .env.example (+4 -9)
📝 .github/bunny-review/reviewer-prompt.md (+1 -1)
📝 .github/bunny-review/rules.json (+1 -1)
📝 CHANGELOG.md (+10 -8)
📝 CONTRIBUTING.md (+3 -3)
📝 docs/CONFIGURATION.md (+2 -4)
📝 docs/TROUBLESHOOTING.md (+3 -7)
📝 docs/data/where-data-is-stored.md (+2 -4)
📝 docs/development/architecture-map.md (+7 -6)
➖ docs/development/file-storage-migration.md (+0 -181)
➕ docs/development/file-storage.md (+54 -0)
📝 docs/development/frontend.md (+1 -1)
📝 docs/development/hierarchical-locations-prd-v3.md (+3 -3)
➖ migrate-presets.cjs (+0 -86)
➖ migrate-variables.cjs (+0 -44)
➖ packages/server/drizzle.config.cts (+0 -81)
📝 packages/server/package.json (+0 -2)
📝 packages/server/src/app.ts (+2 -12)
📝 packages/server/src/config/env-watcher.ts (+0 -3)
📝 packages/server/src/config/runtime-config.ts (+3 -99)

...and 80 more files

📄 Description

Linked issue

Closes #3635

Why this change

  • Marinara has used file-native JSON snapshots for a long time, but every install still carried a dormant database backend, migrations, legacy import/repair readers, ORM metadata parsing, configuration, backup branches, scripts, and dependencies. Removing that unsupported path reduces install weight and eliminates an untested second persistence implementation.

What changed

  • Replaced ORM-derived schema and query objects with collision-safe file-native table metadata and explicit query expressions.
  • Removed the legacy backend switch, startup migrations, import/repair readers, database-file backup handling, obsolete scripts, error translations, and external database/ORM dependencies.
  • Updated Engine schemas, storage consumers, Mari DB inspection, package-owned table support, regressions, configuration, troubleshooting, architecture documentation, contributor guidance, and the changelog.
  • Replaced the historical migration guide with a current file-native storage architecture guide.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Ran pnpm check.
  • Ran pnpm version:check.
  • Ran pnpm regression:issues.
  • Ran the Noodle settings persistence and deletion-memory regressions.
  • Bootstrapped and closed a complete Fastify app against an isolated empty file-native storage directory.
  • Scanned tracked files for retired database, ORM, dependency, and configuration references; none remain.
  • git diff --check passes.
  • No UI behavior changed, so browser viewport and theme verification are not applicable.

Storage-risk proof

  • Core claim: current JSON snapshots continue to load, query, mutate, flush, close, and reopen without the retired backend.
  • Entrypoints tested: app bootstrap, file-native DB initialization, storage flush/close, package-owned table resolution, settings persistence, cascade-backed Noodle deletion, and profile backup compilation.
  • Positive controls: persisted rows survive reopen; writes queued during an active flush are retained; capability-owned table instances resolve by registered name.
  • Negative control: a simulated persistent write failure rejects close and is reported.
  • Legacy backend paths are intentionally removed and therefore are not compatibility targets. Existing DATA_DIR/storage snapshots are not deleted or rewritten by this change.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

Documentation and CHANGELOG.md are updated. This PR does not bump the application version.

UI evidence (if applicable)

Not applicable; this is a server storage and documentation refactor.

Summary by CodeRabbit

  • New Features
    • Marinara now uses file-native JSON storage as its single persistence format.
    • Added/expanded guidance for storage layout, recovery, backups, and corruption handling.
    • Storage configuration simplified to DATA_DIR, FILE_STORAGE_DIR, and ENCRYPTION_KEY.
  • Bug Fixes
    • Improved storage recovery and updated guidance for finding data after updates.
    • Backup/restore flows now consistently include file-native storage data.
  • Documentation
    • Updated configuration, troubleshooting, architecture, and development docs.
    • Replaced legacy migration guidance with the new File-Native Storage guide.

🔄 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/Pasta-Devs/Marinara-Engine/pull/3636 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/15/2026 **Status:** ✅ Merged **Merged:** 7/15/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `remove-sql-compatibility` --- ### 📝 Commits (3) - [`d64c37e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d64c37e14a6b28e241a25cc7d1af9c9ead193ab4) Remove retired SQL compatibility - [`406e83d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/406e83d58e0f14c03a598ce706658b7393176220) Apply CodeRabbit storage cleanup feedback - [`37bb8f7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/37bb8f7587c89bf2cacb4d06074fd64ffad3c4e0) Enforce file-native unique keys ### 📊 Changes **106 files changed** (+936 additions, -3416 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+4 -9) 📝 `.github/bunny-review/reviewer-prompt.md` (+1 -1) 📝 `.github/bunny-review/rules.json` (+1 -1) 📝 `CHANGELOG.md` (+10 -8) 📝 `CONTRIBUTING.md` (+3 -3) 📝 `docs/CONFIGURATION.md` (+2 -4) 📝 `docs/TROUBLESHOOTING.md` (+3 -7) 📝 `docs/data/where-data-is-stored.md` (+2 -4) 📝 `docs/development/architecture-map.md` (+7 -6) ➖ `docs/development/file-storage-migration.md` (+0 -181) ➕ `docs/development/file-storage.md` (+54 -0) 📝 `docs/development/frontend.md` (+1 -1) 📝 `docs/development/hierarchical-locations-prd-v3.md` (+3 -3) ➖ `migrate-presets.cjs` (+0 -86) ➖ `migrate-variables.cjs` (+0 -44) ➖ `packages/server/drizzle.config.cts` (+0 -81) 📝 `packages/server/package.json` (+0 -2) 📝 `packages/server/src/app.ts` (+2 -12) 📝 `packages/server/src/config/env-watcher.ts` (+0 -3) 📝 `packages/server/src/config/runtime-config.ts` (+3 -99) _...and 80 more files_ </details> ### 📄 Description ## Linked issue Closes #3635 ## Why this change - Marinara has used file-native JSON snapshots for a long time, but every install still carried a dormant database backend, migrations, legacy import/repair readers, ORM metadata parsing, configuration, backup branches, scripts, and dependencies. Removing that unsupported path reduces install weight and eliminates an untested second persistence implementation. ## What changed - Replaced ORM-derived schema and query objects with collision-safe file-native table metadata and explicit query expressions. - Removed the legacy backend switch, startup migrations, import/repair readers, database-file backup handling, obsolete scripts, error translations, and external database/ORM dependencies. - Updated Engine schemas, storage consumers, Mari DB inspection, package-owned table support, regressions, configuration, troubleshooting, architecture documentation, contributor guidance, and the changelog. - Replaced the historical migration guide with a current file-native storage architecture guide. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Ran `pnpm check`. - Ran `pnpm version:check`. - Ran `pnpm regression:issues`. - Ran the Noodle settings persistence and deletion-memory regressions. - Bootstrapped and closed a complete Fastify app against an isolated empty file-native storage directory. - Scanned tracked files for retired database, ORM, dependency, and configuration references; none remain. - `git diff --check` passes. - No UI behavior changed, so browser viewport and theme verification are not applicable. ### Storage-risk proof - Core claim: current JSON snapshots continue to load, query, mutate, flush, close, and reopen without the retired backend. - Entrypoints tested: app bootstrap, file-native DB initialization, storage flush/close, package-owned table resolution, settings persistence, cascade-backed Noodle deletion, and profile backup compilation. - Positive controls: persisted rows survive reopen; writes queued during an active flush are retained; capability-owned table instances resolve by registered name. - Negative control: a simulated persistent write failure rejects close and is reported. - Legacy backend paths are intentionally removed and therefore are not compatibility targets. Existing `DATA_DIR/storage` snapshots are not deleted or rewritten by this change. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) Documentation and `CHANGELOG.md` are updated. This PR does not bump the application version. ## UI evidence (if applicable) Not applicable; this is a server storage and documentation refactor. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Marinara now uses file-native JSON storage as its single persistence format. * Added/expanded guidance for storage layout, recovery, backups, and corruption handling. * Storage configuration simplified to `DATA_DIR`, `FILE_STORAGE_DIR`, and `ENCRYPTION_KEY`. * **Bug Fixes** * Improved storage recovery and updated guidance for finding data after updates. * Backup/restore flows now consistently include file-native storage data. * **Documentation** * Updated configuration, troubleshooting, architecture, and development docs. * Replaced legacy migration guidance with the new File-Native Storage guide. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:06:20 +07: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
Pasta-Devs/Marinara-Engine#6025
No description provided.