Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 19a93e0b rédigé par Kubat's avatar Kubat
Parcourir les fichiers

Only add the correct position of the kara in the queue_ view

(incorporate the old position).
parent 04394a77
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!39queue and order
...@@ -122,5 +122,9 @@ CREATE VIEW IF NOT EXISTS kara_ AS ...@@ -122,5 +122,9 @@ CREATE VIEW IF NOT EXISTS kara_ AS
-- A simple view to select things in the queue, where the order matters and -- A simple view to select things in the queue, where the order matters and
-- where we need to see all the priorities and position in a flatten manner. -- where we need to see all the priorities and position in a flatten manner.
CREATE VIEW IF NOT EXISTS queue_ AS CREATE VIEW IF NOT EXISTS queue_ AS
SELECT ROW_NUMBER() OVER(ORDER BY priority DESC, position ASC) AS position, kara_id SELECT
ROW_NUMBER() OVER(ORDER BY priority DESC, position ASC) AS position,
kara_id,
priority,
queue.position AS old_position
FROM queue; FROM queue;
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter