From ee28ee7bcde3bc6a975df64dfde4ae019b67a74a Mon Sep 17 00:00:00 2001 From: Adrian Moennich Date: Fri, 12 Aug 2016 14:00:35 +0200 Subject: [PATCH] LiveSync: Fix order of CHECK constraint criteria They are sorted alphabetically --- ...151736_205f944640f6_add_session_to_livesyncqueueentry.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/livesync/indico_livesync/migrations/201607151736_205f944640f6_add_session_to_livesyncqueueentry.py b/livesync/indico_livesync/migrations/201607151736_205f944640f6_add_session_to_livesyncqueueentry.py index 97f8596..b078a32 100644 --- a/livesync/indico_livesync/migrations/201607151736_205f944640f6_add_session_to_livesyncqueueentry.py +++ b/livesync/indico_livesync/migrations/201607151736_205f944640f6_add_session_to_livesyncqueueentry.py @@ -39,7 +39,7 @@ def upgrade(): 'AND subcontribution_id IS NULL AND event_id IS NOT NULL)', schema='plugin_livesync') op.create_check_constraint('valid_session_entry', 'queues', - 'type != 5 OR (category_id IS NULL AND event_id IS NULL AND contribution_id IS NULL ' + 'type != 5 OR (category_id IS NULL AND contribution_id IS NULL AND event_id IS NULL ' 'AND subcontribution_id IS NULL AND session_id IS NOT NULL)', schema='plugin_livesync') op.create_check_constraint('valid_contribution_entry', 'queues', @@ -47,8 +47,8 @@ def upgrade(): 'subcontribution_id IS NULL AND contribution_id IS NOT NULL)', schema='plugin_livesync') op.create_check_constraint('valid_subcontribution_entry', 'queues', - 'type != 4 OR (category_id IS NULL AND contribution_id IS NULL AND session_id IS NULL ' - 'AND event_id IS NULL AND subcontribution_id IS NOT NULL)', + 'type != 4 OR (category_id IS NULL AND contribution_id IS NULL AND event_id IS NULL AND ' + 'session_id IS NULL AND subcontribution_id IS NOT NULL)', schema='plugin_livesync')