mirror of
https://github.com/inventree/InvenTree.git
synced 2025-12-14 00:09:56 +00:00
Rename underlying database tables
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
# Generated by Django 5.2.8 on 2025-12-03 14:27
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("common", "0041_auto_20251203_1244"),
|
||||
]
|
||||
|
||||
# Rename the database tables after migrating from the "part" app
|
||||
operations = [
|
||||
migrations.AlterModelTable(
|
||||
name='ParameterTemplate',
|
||||
table='common_parametertemplate',
|
||||
),
|
||||
migrations.AlterModelTable(
|
||||
name='Parameter',
|
||||
table='common_parameter',
|
||||
),
|
||||
migrations.RenameIndex(
|
||||
model_name="parameter",
|
||||
new_name="common_para_model_t_244405_idx",
|
||||
old_name="part_partpa_model_t_198c9d_idx",
|
||||
),
|
||||
migrations.AlterModelTable(
|
||||
name="parameter",
|
||||
table=None,
|
||||
),
|
||||
migrations.AlterModelTable(
|
||||
name="parametertemplate",
|
||||
table=None,
|
||||
),
|
||||
]
|
||||
@@ -2387,11 +2387,6 @@ class ParameterTemplate(
|
||||
verbose_name = _('Parameter Template')
|
||||
verbose_name_plural = _('Parameter Templates')
|
||||
|
||||
# Note: Data was migrated from the existing 'part_partparametertemplate' table
|
||||
# Ref: https://github.com/inventree/InvenTree/pull/10699
|
||||
# To avoid data loss, we retain the existing table name
|
||||
db_table = 'part_partparametertemplate'
|
||||
|
||||
class ModelChoices(RenderChoices):
|
||||
"""Model choices for parameters."""
|
||||
|
||||
@@ -2583,11 +2578,6 @@ class Parameter(
|
||||
unique_together = [['model_type', 'model_id', 'template']]
|
||||
indexes = [models.Index(fields=['model_type', 'model_id'])]
|
||||
|
||||
# Note: Data was migrated from the existing 'part_partparameter' table
|
||||
# Ref: https://github.com/inventree/InvenTree/pull/10699
|
||||
# To avoid data loss, we retain the existing table name
|
||||
db_table = 'part_partparameter'
|
||||
|
||||
class ModelChoices(RenderChoices):
|
||||
"""Model choices for parameters."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user