fix(migrations): correct TextElement foreign key field
Added a missing 'imageelement_ptr' field to the 'textelement' model to correct the migration and ensure proper foreign key relationship. Removed the obsolete 'element_ptr' field. This change addresses a structural inconsistency in the database schema.
This commit is contained in:
parent
c30a81df1f
commit
d8f8ae30e3
1 changed files with 8 additions and 3 deletions
|
@ -11,14 +11,19 @@ class Migration(migrations.Migration):
|
|||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='textelement',
|
||||
name='imageelement_ptr',
|
||||
field=models.OneToOneField(auto_created=True, default=0, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=False, serialize=False, to='tours.imageelement'),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='textelement',
|
||||
name='element_ptr',
|
||||
),
|
||||
migrations.AddField(
|
||||
migrations.AlterField(
|
||||
model_name='textelement',
|
||||
name='imageelement_ptr',
|
||||
field=models.OneToOneField(auto_created=True, default=0, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='tours.imageelement'),
|
||||
preserve_default=False,
|
||||
field=models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='tours.imageelement'),
|
||||
),
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue