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:
Kumi 2024-06-20 19:56:13 +02:00
parent c30a81df1f
commit d8f8ae30e3
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -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'),
),
]