From 9b909b3ae7c74a828da60e5bf546b5feac1d0750 Mon Sep 17 00:00:00 2001
From: schneefux <schneefux+commit@schneefux.xyz>
Date: Fri, 23 Jun 2017 13:05:17 +0200
Subject: fix sequelize having issues with :digit:

---
 crunch_global.sql | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

(limited to 'crunch_global.sql')

diff --git a/crunch_global.sql b/crunch_global.sql
index 30b31b2..537adae 100644
--- a/crunch_global.sql
+++ b/crunch_global.sql
@@ -54,12 +54,12 @@ JOIN `build` ON `build`.`name` = 'all' OR (
     `series`.`show_in_web` = TRUE AND
     `filter`.`name` = 'all' AND
 
-    `build`.`item_1` IS NOT NULL OR `participant_stats`.`item_grants` RLIKE CONCAT('^([[:digit:]]+;[[:digit:]]+,)*(', `build`.`item_1`, ';', `build`.`item_1_count`, ')+(,[[:digit:]]+;[[:digit:]]+)*$') AND
-    `build`.`item_2` IS NOT NULL OR `participant_stats`.`item_grants` RLIKE CONCAT('^([[:digit:]]+;[[:digit:]]+,)*(', `build`.`item_2`, ';', `build`.`item_2_count`, ')+(,[[:digit:]]+;[[:digit:]]+)*$') AND
-    `build`.`item_3` IS NOT NULL OR `participant_stats`.`item_grants` RLIKE CONCAT('^([[:digit:]]+;[[:digit:]]+,)*(', `build`.`item_3`, ';', `build`.`item_3_count`, ')+(,[[:digit:]]+;[[:digit:]]+)*$') AND
-    `build`.`item_4` IS NOT NULL OR `participant_stats`.`item_grants` RLIKE CONCAT('^([[:digit:]]+;[[:digit:]]+,)*(', `build`.`item_4`, ';', `build`.`item_4_count`, ')+(,[[:digit:]]+;[[:digit:]]+)*$') AND
-    `build`.`item_5` IS NOT NULL OR `participant_stats`.`item_grants` RLIKE CONCAT('^([[:digit:]]+;[[:digit:]]+,)*(', `build`.`item_5`, ';', `build`.`item_5_count`, ')+(,[[:digit:]]+;[[:digit:]]+)*$') AND
-    `build`.`item_6` IS NOT NULL OR `participant_stats`.`item_grants` RLIKE CONCAT('^([[:digit:]]+;[[:digit:]]+,)*(', `build`.`item_6`, ';', `build`.`item_6_count`, ')+(,[[:digit:]]+;[[:digit:]]+)*$')
+    `build`.`item_1` IS NOT NULL OR `participant_stats`.`item_grants` RLIKE CONCAT(:build_regex_start, `build`.`item_1`, ';', `build`.`item_1_count`, :build_regex_end) AND
+    `build`.`item_2` IS NOT NULL OR `participant_stats`.`item_grants` RLIKE CONCAT(:build_regex_start, `build`.`item_2`, ';', `build`.`item_2_count`, :build_regex_end) AND
+    `build`.`item_3` IS NOT NULL OR `participant_stats`.`item_grants` RLIKE CONCAT(:build_regex_start, `build`.`item_3`, ';', `build`.`item_3_count`, :build_regex_end) AND
+    `build`.`item_4` IS NOT NULL OR `participant_stats`.`item_grants` RLIKE CONCAT(:build_regex_start, `build`.`item_4`, ';', `build`.`item_4_count`, :build_regex_end) AND
+    `build`.`item_5` IS NOT NULL OR `participant_stats`.`item_grants` RLIKE CONCAT(:build_regex_start, `build`.`item_5`, ';', `build`.`item_5_count`, :build_regex_end) AND
+    `build`.`item_6` IS NOT NULL OR `participant_stats`.`item_grants` RLIKE CONCAT(:build_regex_start, `build`.`item_6`, ';', `build`.`item_6_count`, :build_regex_end)
 )
 
 -- counters
-- 
cgit v1.3.1

