move to match type country instead of geoip

This commit is contained in:
Lokowitz
2025-10-23 13:19:27 +00:00
parent 6f8b5dd909
commit 4e4a38f7e9
5 changed files with 58 additions and 12 deletions

View File

@@ -0,0 +1,18 @@
import { APP_PATH } from "@server/lib/consts";
import Database from "better-sqlite3";
import path from "path";
const version = "1.11.2";
export default async function migration() {
console.log(`Running setup script ${version}...`);
const location = path.join(APP_PATH, "db", "db.sqlite");
const db = new Database(location);
db.transaction(() => {
db.prepare(`UPDATE resourceRules SET match = "COUNTRY" WHERE match = "GEOIP"`).run();
})();
console.log(`${version} migration complete`);
}