db: add globalPercent to songs schema

This commit is contained in:
2026-02-06 08:04:11 -08:00
parent 7eb4bc1bb1
commit 323c7c7f77
3 changed files with 3 additions and 1 deletions

View File

@@ -14,7 +14,7 @@ import { getClientDb } from "$lib/db/client-db";
* This is intended for READ-ONLY browsing. Bump the version when you ship a new * This is intended for READ-ONLY browsing. Bump the version when you ship a new
* snapshot so clients refresh. * snapshot so clients refresh.
*/ */
export const AMQ_DB_SEED_VERSION = 2; export const AMQ_DB_SEED_VERSION = 3;
const SEED_ASSET_PATH = "/data/amq.sqlite"; const SEED_ASSET_PATH = "/data/amq.sqlite";
const seededStorageKey = (version: number) => `amq.sqlocal.seeded.v${version}`; const seededStorageKey = (version: number) => `amq.sqlocal.seeded.v${version}`;

View File

@@ -334,6 +334,7 @@ export async function importAmqData(
fileName: s.fileName, fileName: s.fileName,
fileName480: s.fileNameMap["480"], fileName480: s.fileNameMap["480"],
fileName720: s.fileNameMap["720"], fileName720: s.fileNameMap["720"],
globalPercent: s.globalPercent,
meanVolume: s.meanVolume, meanVolume: s.meanVolume,
songArtistId: s.songArtistId, songArtistId: s.songArtistId,
songGroupId: s.songGroupId, songGroupId: s.songGroupId,

View File

@@ -37,6 +37,7 @@ export const songs = sqliteTable(
fileName: text("file_name"), fileName: text("file_name"),
fileName480: text("file_name_480"), fileName480: text("file_name_480"),
fileName720: text("file_name_720"), fileName720: text("file_name_720"),
globalPercent: integer("global_percent"),
meanVolume: real("mean_volume"), meanVolume: real("mean_volume"),
/** /**