fix(server): snapshot service-update databases with VACUUM INTO #8431
ClosedAdolanium(GitHub profile, opens in a new tab)wants to merge 2 commits into
main fromrefs/pull/8431/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- apps/server/src/serviceLauncher.ts lines 100 to 100OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -89,3 +90,11 @@8990 }9091 }919293+function quoteSqliteLiteral(value: string): string {94+ return `'${value.replaceAll("'", "''")}'`;95+}96+97+export function vacuumDatabaseInto(sourcePath: string, destinationPath: string): void {98+ const db = new DatabaseSync(sourcePath, { readOnly: true });99+ try {100+ db.exec(`VACUUM INTO ${quoteSqliteLiteral(destinationPath.replaceAll("\\", "/"))}`);
- apps/server/src/serviceLauncher.test.ts line 239Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -236,4 +278,3 @@236278 const root = yield* fs.makeTempDirectoryScoped({ prefix: "t3-service-launcher-db-" });237279 const statePath = path.join(root, "runtime", "service-state.json");238280 const databasePath = path.join(root, "userdata", "state.sqlite");239- const original = "database before migration";
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
juliusmarminge closed this
Sign in to join this conversation.


Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
7d3047eb-90f7-403b-869d-b1f0d5c58321You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Comment `@coderabbitai help` to get the list of available commands.