]> git.ipfire.org Git - people/jschlag/pbs.git/commitdiff
jobs: Drop type column
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 21 Oct 2017 15:01:54 +0000 (16:01 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 21 Oct 2017 15:01:54 +0000 (16:01 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/database.sql

index 61d3b7a988b1587cad3a2893dea9362c1ea8efd0..53b57c5749821039b4565440bbe1fa553a5ccf5d 100644 (file)
@@ -853,7 +853,6 @@ ALTER SEQUENCE builds_id_seq OWNED BY builds.id;
 CREATE TABLE jobs (
     id integer NOT NULL,
     uuid text NOT NULL,
-    type jobs_type DEFAULT 'build'::jobs_type NOT NULL,
     build_id integer NOT NULL,
     state jobs_state DEFAULT 'new'::jobs_state NOT NULL,
     arch text NOT NULL,
@@ -1164,7 +1163,7 @@ ALTER SEQUENCE jobs_packages_id_seq OWNED BY jobs_packages.id;
 CREATE VIEW jobs_queue AS
  WITH queue AS (
          SELECT jobs.id,
-            rank() OVER (ORDER BY jobs.type, builds.priority DESC, jobs.time_created) AS rank
+            rank() OVER (ORDER BY (NOT jobs.test), builds.priority DESC, jobs.time_created) AS rank
            FROM (jobs
              LEFT JOIN builds ON ((jobs.build_id = builds.id)))
           WHERE (jobs.state = 'pending'::jobs_state)