Fix blocking collection matching with large plugins
This commit is contained in:
@@ -369,6 +369,13 @@ export function db(): Database.Database {
|
||||
backfillLeaderboard(handle);
|
||||
initializeFleetSettings(handle);
|
||||
migrateNativeInstances(handle);
|
||||
// Lifecycle history is retained indefinitely. Admission and status reads
|
||||
// must narrow by server or active state instead of scanning that history.
|
||||
// Install after migrations that rebuild this table or add server_deleted_at.
|
||||
handle.exec(`CREATE INDEX IF NOT EXISTS idx_server_deployments_server
|
||||
ON server_deployments(server, server_deleted_at);
|
||||
CREATE INDEX IF NOT EXISTS idx_server_deployments_state
|
||||
ON server_deployments(state, action, server_deleted_at);`);
|
||||
installReportRevisions(handle);
|
||||
} catch (err) {
|
||||
handle.close();
|
||||
|
||||
@@ -516,8 +516,9 @@ CREATE TABLE IF NOT EXISTS server_launch_previews (
|
||||
deployment_id TEXT REFERENCES server_deployments(id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
-- Historical launch files survive library deletion. New launches resolve current
|
||||
-- promotions instead of replaying these snapshots; credentials stay in their stores.
|
||||
-- Queued plans contain metadata only. Attempted launch files survive library
|
||||
-- deletion. New launches resolve current promotions instead of replaying these
|
||||
-- snapshots; credentials stay in their stores.
|
||||
CREATE TABLE IF NOT EXISTS server_launch_recipes (
|
||||
deployment_id TEXT PRIMARY KEY REFERENCES server_deployments(id) ON DELETE CASCADE,
|
||||
recipe TEXT NOT NULL,
|
||||
|
||||
Reference in New Issue
Block a user