mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 09:11:08 -05:00
- Updated migration files to remove references to the old `companies` app and replace them with new app dependencies (`operators` and `manufacturers`). - Fixed foreign key references in migration files to point to the correct models in the new apps. - Updated import statements in management commands and test files to reflect the new app structure. - Completed a thorough validation of the migration system to ensure full functionality and operational status.
66 lines
2.3 KiB
Python
66 lines
2.3 KiB
Python
# Generated by Django 5.1.4 on 2025-02-10 09:31
|
|
|
|
import django.db.models.deletion
|
|
from django.db import migrations, models
|
|
|
|
class Migration(migrations.Migration):
|
|
dependencies = [
|
|
("manufacturers", "0001_initial"),
|
|
("rides", "0001_initial"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="RideModel",
|
|
fields=[
|
|
("id", models.BigAutoField(primary_key=True, serialize=False)),
|
|
("name", models.CharField(max_length=255)),
|
|
("description", models.TextField(blank=True)),
|
|
(
|
|
"category",
|
|
models.CharField(
|
|
blank=True,
|
|
choices=[
|
|
("", "Select ride type"),
|
|
("RC", "Roller Coaster"),
|
|
("DR", "Dark Ride"),
|
|
("FR", "Flat Ride"),
|
|
("WR", "Water Ride"),
|
|
("TR", "Transport"),
|
|
("OT", "Other"),
|
|
],
|
|
default="",
|
|
max_length=2,
|
|
),
|
|
),
|
|
("created_at", models.DateTimeField(auto_now_add=True)),
|
|
("updated_at", models.DateTimeField(auto_now=True)),
|
|
(
|
|
"manufacturer",
|
|
models.ForeignKey(
|
|
blank=True,
|
|
null=True,
|
|
on_delete=django.db.models.deletion.SET_NULL,
|
|
related_name="ride_models",
|
|
to="manufacturers.manufacturer",
|
|
),
|
|
),
|
|
],
|
|
options={
|
|
"ordering": ["manufacturer", "name"],
|
|
"unique_together": {("manufacturer", "name")},
|
|
},
|
|
),
|
|
migrations.AddField(
|
|
model_name="ride",
|
|
name="ride_model",
|
|
field=models.ForeignKey(
|
|
blank=True,
|
|
help_text="The specific model/type of this ride",
|
|
null=True,
|
|
on_delete=django.db.models.deletion.SET_NULL,
|
|
related_name="rides",
|
|
to="rides.ridemodel",
|
|
),
|
|
),
|
|
] |