diff --git a/SpiNNaker-allocserv/src/main/java/uk/ac/manchester/spinnaker/alloc/db/SQLQueries.java b/SpiNNaker-allocserv/src/main/java/uk/ac/manchester/spinnaker/alloc/db/SQLQueries.java index c71ade7335..e125534943 100644 --- a/SpiNNaker-allocserv/src/main/java/uk/ac/manchester/spinnaker/alloc/db/SQLQueries.java +++ b/SpiNNaker-allocserv/src/main/java/uk/ac/manchester/spinnaker/alloc/db/SQLQueries.java @@ -809,7 +809,7 @@ public abstract class SQLQueries { */ @Parameter("change_id") protected static final String ERROR_PENDING = - "UPDATE pending_changes SET error=1 WHERE change_id = :change_id"; + "UPDATE pending_changes SET is_error=1 WHERE change_id = :change_id"; /** * Get descriptions of how to move from a board to its neighbours. @@ -862,7 +862,7 @@ public abstract class SQLQueries { @ResultColumn("n_errors") protected static final String COUNT_CHANGES_FOR_JOB = "SELECT COUNT(change_id) as n_changes, " - + "COALESCE(SUM(error), 0) as n_errors " + + "COALESCE(SUM(is_error), 0) as n_errors " + "FROM pending_changes " + "WHERE job_id = :job_id AND from_state = :from_state " + "AND to_state = :to_state"; diff --git a/SpiNNaker-allocserv/src/main/resources/spalloc-mysql.sql b/SpiNNaker-allocserv/src/main/resources/spalloc-mysql.sql index 842701297d..100c1e9922 100644 --- a/SpiNNaker-allocserv/src/main/resources/spalloc-mysql.sql +++ b/SpiNNaker-allocserv/src/main/resources/spalloc-mysql.sql @@ -398,8 +398,8 @@ CREATE TABLE IF NOT EXISTS pending_changes ( CONSTRAINT pending_changes_fpga_nw CHECK (fpga_nw IN (0, 1)), fpga_se INTEGER NOT NULL -- Whether to switch the southeast FPGA on CONSTRAINT pending_changes_fpga_se CHECK (fpga_se IN (0, 1)), - error INTEGER NOT NULL DEFAULT (0) - CONSTRAINT pending_changes_error CHECK (error IN (0, 1)), + is_error INTEGER NOT NULL DEFAULT (0) + CONSTRAINT pending_changes_error CHECK (is_error IN (0, 1)), from_state INTEGER NOT NULL DEFAULT (0), FOREIGN KEY (from_state) REFERENCES job_states(id) ON DELETE RESTRICT,