feat: add db cleanup command line argument

This commit is contained in:
2026-01-26 04:29:36 +01:00
parent 56273c2e3f
commit 3a68531fb4
3 changed files with 131 additions and 6 deletions

View File

@@ -19,6 +19,22 @@ public partial class _00000000000000_StoredProcedure : Migration
END;
$$;
""");
migrationBuilder.Sql("""
CREATE OR REPLACE PROCEDURE force_rescan()
LANGUAGE plpgsql
AS $$
BEGIN
UPDATE "Globals"
SET "Value" = '0'
WHERE "Key" = 'libraryState';
COMMIT;
END;
$$;
""");
}
@@ -27,6 +43,10 @@ public partial class _00000000000000_StoredProcedure : Migration
migrationBuilder.Sql("""
DROP PROCEDURE IF EXISTS song_cleanup();
""");
migrationBuilder.Sql("""
DROP PROCEDURE IF EXISTS force_rescan();
""");
}
}