Skip to content

Commit

Permalink
fix: add an index on tool query audit log tables (#2752)
Browse files Browse the repository at this point in the history
* fix: add an index on tool query audit log tables

* fix: add migration
  • Loading branch information
niross authored Sep 1, 2023
1 parent e2b28ac commit 6d3acfc
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Generated by Django 3.2.19 on 2023-09-01 13:47

import django.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("datasets", "0150_pipeline_notes"),
]

operations = [
migrations.AlterField(
model_name="toolqueryauditlogtable",
name="schema",
field=models.CharField(
db_index=True,
default="public",
max_length=63,
validators=[
django.core.validators.RegexValidator(regex="^[a-zA-Z][a-zA-Z0-9_\\.]*$")
],
),
),
migrations.AlterField(
model_name="toolqueryauditlogtable",
name="table",
field=models.CharField(
db_index=True,
max_length=63,
validators=[
django.core.validators.RegexValidator(regex="^[a-zA-Z][a-zA-Z0-9_\\.]*$")
],
),
),
]
2 changes: 2 additions & 0 deletions dataworkspace/dataworkspace/apps/datasets/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2758,10 +2758,12 @@ class ToolQueryAuditLogTable(models.Model):
max_length=63,
validators=[RegexValidator(regex=r"^[a-zA-Z][a-zA-Z0-9_\.]*$")],
default="public",
db_index=True,
)
table = models.CharField(
max_length=63,
validators=[RegexValidator(regex=r"^[a-zA-Z][a-zA-Z0-9_\.]*$")],
db_index=True,
)


Expand Down

0 comments on commit 6d3acfc

Please sign in to comment.