Skip to content

Commit

Permalink
fixup! nit re #10541, rename tables
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Feb 22, 2024
1 parent c991527 commit 1fe011a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
24 changes: 24 additions & 0 deletions arches/app/models/migrations/10542_remove_app_name_from_table.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 4.2.10 on 2024-02-21 17:58

from django.db import migrations


class Migration(migrations.Migration):
dependencies = [
("models", "10541_controlled_list_manager"),
]

operations = [
migrations.AlterModelTable(
name="controlledlist",
table="controlled_lists",
),
migrations.AlterModelTable(
name="controlledlistitem",
table="controlled_list_items",
),
migrations.AlterModelTable(
name="controlledlistitemlabel",
table="controlled_list_item_labels",
),
]
5 changes: 5 additions & 0 deletions arches/app/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1844,6 +1844,9 @@ class ControlledList(models.Model):
name = models.CharField(max_length=127, null=False)
dynamic = models.BooleanField(default=False)

class Meta:
db_table = "controlled_lists"


class ControlledListItem(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
Expand All @@ -1861,6 +1864,7 @@ class ControlledListItem(models.Model):
)

class Meta:
db_table = "controlled_list_items"
constraints = [
# Sort order concerns the list as a whole, not subsets
# of the hierarchy.
Expand Down Expand Up @@ -1896,6 +1900,7 @@ class ControlledListItemLabel(models.Model):
value = models.CharField(max_length=1024, null=False)

class Meta:
db_table = "controlled_list_item_labels"
constraints = [
models.UniqueConstraint(
fields=["item", "value", "value_type", "language"],
Expand Down

0 comments on commit 1fe011a

Please sign in to comment.