summaryrefslogtreecommitdiffstats
path: root/src/db.rs
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-07-29 11:19:12 +0200
committersalmonik <salmonik@tuta.io>2026-07-29 11:19:12 +0200
commit1102f17a93111dca640d790cf9963a9ec9312096 (patch)
tree4134d9629fc67bf955a069805b37d5ee6e499c1d /src/db.rs
parentMod picker: allow selecting multiple .jar files for upload (diff)
downloadminecraft-ui-1102f17a93111dca640d790cf9963a9ec9312096.tar.gz
minecraft-ui-1102f17a93111dca640d790cf9963a9ec9312096.zip
Enable/disable mods, batch toggle & delete
- Add column to mods table (auto-migrated) - Toggle endpoint: rename .jar ↔ .jar.disabled on disk, flip DB flag - Batch toggle & delete with checkboxes + JS helper (fixes nested-form bug) - Raw Vec<(String,String)> form deserialization fixes 'duplicate field' error - Batch action bars at top and bottom of mod list - Uploads default to enabled=1, rescan skips .jar.disabled files
Diffstat (limited to '')
-rw-r--r--src/db.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/db.rs b/src/db.rs
index 2024032..4d2de88 100644
--- a/src/db.rs
+++ b/src/db.rs
@@ -114,6 +114,9 @@ impl Database {
114 let _ = conn.execute_batch( 114 let _ = conn.execute_batch(
115 "ALTER TABLE instances ADD COLUMN whitelist_enabled INTEGER NOT NULL DEFAULT 1", 115 "ALTER TABLE instances ADD COLUMN whitelist_enabled INTEGER NOT NULL DEFAULT 1",
116 ); 116 );
117 // Migration: add enabled column to mods for disable/enable toggling
118 let _ =
119 conn.execute_batch("ALTER TABLE mods ADD COLUMN enabled INTEGER NOT NULL DEFAULT 1");
117 Ok(()) 120 Ok(())
118 } 121 }
119 122