Skip to content

Commit

Permalink
issue-1573 added user_id index inside resource_access table (tl-its-u…
Browse files Browse the repository at this point in the history
  • Loading branch information
zqian authored Aug 15, 2024
1 parent dd5cc28 commit 2be9f8f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
17 changes: 17 additions & 0 deletions dashboard/migrations/0029_resourceaccess_user_id_idx.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.2.11 on 2024-07-27 15:47

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('dashboard', '0028_alter_academicterms_canvas_id_and_more'),
]

operations = [
migrations.AddIndex(
model_name='resourceaccess',
index=models.Index(fields=['user_id'], name='user_id_idx'),
),
]
3 changes: 3 additions & 0 deletions dashboard/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,9 @@ def __str__(self):

class Meta:
db_table = 'resource_access'
indexes = [
models.Index(fields=['user_id'], name='user_id_idx'),
]

class Submission(models.Model):
id = models.BigIntegerField(primary_key=True, verbose_name="Submission Id")
Expand Down

0 comments on commit 2be9f8f

Please sign in to comment.