From d9f60cba7af74dd724306111b366dda78b363236 Mon Sep 17 00:00:00 2001 From: Alex Dusenbery Date: Thu, 30 Aug 2018 14:50:20 -0400 Subject: [PATCH] Add a (user_id, role_id) index to dcc_role_users table. --- .../migrations/0008_role_user_index.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 common/djangoapps/django_comment_common/migrations/0008_role_user_index.py diff --git a/common/djangoapps/django_comment_common/migrations/0008_role_user_index.py b/common/djangoapps/django_comment_common/migrations/0008_role_user_index.py new file mode 100644 index 0000000000..5624c9b918 --- /dev/null +++ b/common/djangoapps/django_comment_common/migrations/0008_role_user_index.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('django_comment_common', '0007_discussionsidmapping'), + ] + + operations = [ + migrations.RunSQL( + 'CREATE INDEX dcc_role_users_user_role_idx ON django_comment_client_role_users(user_id, role_id);' + ), + ]