@@ -0,0 +1,848 @@
+package com.conveyal.analyst.server.migrations;%0A%0Aimport com.conveyal.analyst.server.utils.DataStore;%0Aimport models.Query;%0A%0Aimport java.io.File;%0A%0A/**%0A * Update the query complete flag based on whether completePoints equals totalPoints.%0A */%0Apublic class SetQueryCompletion %7B%0A    public static void main (String... args) %7B%0A        File input = new File(args%5B0%5D);%0A%0A        if (!input.exists() %7C%7C !input.isDirectory()) %7B%0A            System.err.println(%22Input is not a directory or does not exist.%22);%0A            return;%0A        %7D%0A%0A        DataStore%3CQuery%3E queryStore = new DataStore%3CQuery%3E(input, %22queries%22);%0A%0A        queryStore.getAll().stream().filter(q -%3E q.totalPoints != null && q.totalPoints.equals(q.completePoints))%0A                .forEach(q -%3E %7B%0A                    q.complete = true;%0A                    q.save();%0A                %7D);%0A    %7D%0A%7D%0A

set the complete flag based on the complete points.