# Generated by Django 5.2.9 on 2026-01-08 18:05

import pgtrigger.compiler
import pgtrigger.migrations
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('parks', '0028_add_date_precision_fields'),
    ]

    operations = [
        pgtrigger.migrations.RemoveTrigger(
            model_name='company',
            name='insert_insert',
        ),
        pgtrigger.migrations.RemoveTrigger(
            model_name='company',
            name='update_update',
        ),
        pgtrigger.migrations.RemoveTrigger(
            model_name='park',
            name='insert_insert',
        ),
        pgtrigger.migrations.RemoveTrigger(
            model_name='park',
            name='update_update',
        ),
        migrations.AddField(
            model_name='company',
            name='is_test_data',
            field=models.BooleanField(default=False, help_text='Whether this is test/development data'),
        ),
        migrations.AddField(
            model_name='company',
            name='source_url',
            field=models.URLField(blank=True, help_text='Source URL for the data (e.g., official website, Wikipedia)'),
        ),
        migrations.AddField(
            model_name='companyevent',
            name='is_test_data',
            field=models.BooleanField(default=False, help_text='Whether this is test/development data'),
        ),
        migrations.AddField(
            model_name='companyevent',
            name='source_url',
            field=models.URLField(blank=True, help_text='Source URL for the data (e.g., official website, Wikipedia)'),
        ),
        migrations.AddField(
            model_name='park',
            name='is_test_data',
            field=models.BooleanField(default=False, help_text='Whether this is test/development data'),
        ),
        migrations.AddField(
            model_name='park',
            name='source_url',
            field=models.URLField(blank=True, help_text='Source URL for the data (e.g., official website, Wikipedia)'),
        ),
        migrations.AddField(
            model_name='parkevent',
            name='is_test_data',
            field=models.BooleanField(default=False, help_text='Whether this is test/development data'),
        ),
        migrations.AddField(
            model_name='parkevent',
            name='source_url',
            field=models.URLField(blank=True, help_text='Source URL for the data (e.g., official website, Wikipedia)'),
        ),
        migrations.AlterField(
            model_name='company',
            name='founded_date_precision',
            field=models.CharField(blank=True, choices=[('exact', 'Exact Date'), ('month', 'Month and Year'), ('year', 'Year Only'), ('decade', 'Decade'), ('century', 'Century'), ('approximate', 'Approximate')], help_text='Precision of the founding date', max_length=20),
        ),
        migrations.AlterField(
            model_name='companyevent',
            name='founded_date_precision',
            field=models.CharField(blank=True, choices=[('exact', 'Exact Date'), ('month', 'Month and Year'), ('year', 'Year Only'), ('decade', 'Decade'), ('century', 'Century'), ('approximate', 'Approximate')], help_text='Precision of the founding date', max_length=20),
        ),
        migrations.AlterField(
            model_name='park',
            name='closing_date_precision',
            field=models.CharField(blank=True, choices=[('exact', 'Exact Date'), ('month', 'Month and Year'), ('year', 'Year Only'), ('decade', 'Decade'), ('century', 'Century'), ('approximate', 'Approximate')], default='exact', help_text='Precision of the closing date', max_length=20),
        ),
        migrations.AlterField(
            model_name='park',
            name='opening_date_precision',
            field=models.CharField(blank=True, choices=[('exact', 'Exact Date'), ('month', 'Month and Year'), ('year', 'Year Only'), ('decade', 'Decade'), ('century', 'Century'), ('approximate', 'Approximate')], default='exact', help_text='Precision of the opening date', max_length=20),
        ),
        migrations.AlterField(
            model_name='parkevent',
            name='closing_date_precision',
            field=models.CharField(blank=True, choices=[('exact', 'Exact Date'), ('month', 'Month and Year'), ('year', 'Year Only'), ('decade', 'Decade'), ('century', 'Century'), ('approximate', 'Approximate')], default='exact', help_text='Precision of the closing date', max_length=20),
        ),
        migrations.AlterField(
            model_name='parkevent',
            name='opening_date_precision',
            field=models.CharField(blank=True, choices=[('exact', 'Exact Date'), ('month', 'Month and Year'), ('year', 'Year Only'), ('decade', 'Decade'), ('century', 'Century'), ('approximate', 'Approximate')], default='exact', help_text='Precision of the opening date', max_length=20),
        ),
        pgtrigger.migrations.AddTrigger(
            model_name='company',
            trigger=pgtrigger.compiler.Trigger(name='insert_insert', sql=pgtrigger.compiler.UpsertTriggerSql(func='INSERT INTO "parks_companyevent" ("average_rating", "banner_image_url", "card_image_url", "created_at", "description", "founded_date", "founded_date_precision", "founded_year", "id", "is_test_data", "logo_url", "name", "parks_count", "person_type", "pgh_context_id", "pgh_created_at", "pgh_label", "pgh_obj_id", "review_count", "rides_count", "roles", "slug", "source_url", "status", "updated_at", "website") VALUES (NEW."average_rating", NEW."banner_image_url", NEW."card_image_url", NEW."created_at", NEW."description", NEW."founded_date", NEW."founded_date_precision", NEW."founded_year", NEW."id", NEW."is_test_data", NEW."logo_url", NEW."name", NEW."parks_count", NEW."person_type", _pgh_attach_context(), NOW(), \'insert\', NEW."id", NEW."review_count", NEW."rides_count", NEW."roles", NEW."slug", NEW."source_url", NEW."status", NEW."updated_at", NEW."website"); RETURN NULL;', hash='8352ecabfefc26dab2c91be68a9e137a1e48cbd2', operation='INSERT', pgid='pgtrigger_insert_insert_35b57', table='parks_company', when='AFTER')),
        ),
        pgtrigger.migrations.AddTrigger(
            model_name='company',
            trigger=pgtrigger.compiler.Trigger(name='update_update', sql=pgtrigger.compiler.UpsertTriggerSql(condition='WHEN (OLD.* IS DISTINCT FROM NEW.*)', func='INSERT INTO "parks_companyevent" ("average_rating", "banner_image_url", "card_image_url", "created_at", "description", "founded_date", "founded_date_precision", "founded_year", "id", "is_test_data", "logo_url", "name", "parks_count", "person_type", "pgh_context_id", "pgh_created_at", "pgh_label", "pgh_obj_id", "review_count", "rides_count", "roles", "slug", "source_url", "status", "updated_at", "website") VALUES (NEW."average_rating", NEW."banner_image_url", NEW."card_image_url", NEW."created_at", NEW."description", NEW."founded_date", NEW."founded_date_precision", NEW."founded_year", NEW."id", NEW."is_test_data", NEW."logo_url", NEW."name", NEW."parks_count", NEW."person_type", _pgh_attach_context(), NOW(), \'update\', NEW."id", NEW."review_count", NEW."rides_count", NEW."roles", NEW."slug", NEW."source_url", NEW."status", NEW."updated_at", NEW."website"); RETURN NULL;', hash='5d8b399ed7573fa0d5411042902c0a494785e071', operation='UPDATE', pgid='pgtrigger_update_update_d3286', table='parks_company', when='AFTER')),
        ),
        pgtrigger.migrations.AddTrigger(
            model_name='park',
            trigger=pgtrigger.compiler.Trigger(name='insert_insert', sql=pgtrigger.compiler.UpsertTriggerSql(func='INSERT INTO "parks_parkevent" ("average_rating", "banner_image_id", "card_image_id", "closing_date", "closing_date_precision", "coaster_count", "created_at", "description", "email", "id", "is_test_data", "name", "opening_date", "opening_date_precision", "opening_year", "operating_season", "operator_id", "park_type", "pgh_context_id", "pgh_created_at", "pgh_label", "pgh_obj_id", "phone", "property_owner_id", "ride_count", "search_text", "size_acres", "slug", "source_url", "status", "timezone", "updated_at", "url", "website") VALUES (NEW."average_rating", NEW."banner_image_id", NEW."card_image_id", NEW."closing_date", NEW."closing_date_precision", NEW."coaster_count", NEW."created_at", NEW."description", NEW."email", NEW."id", NEW."is_test_data", NEW."name", NEW."opening_date", NEW."opening_date_precision", NEW."opening_year", NEW."operating_season", NEW."operator_id", NEW."park_type", _pgh_attach_context(), NOW(), \'insert\', NEW."id", NEW."phone", NEW."property_owner_id", NEW."ride_count", NEW."search_text", NEW."size_acres", NEW."slug", NEW."source_url", NEW."status", NEW."timezone", NEW."updated_at", NEW."url", NEW."website"); RETURN NULL;', hash='cb0e4e056880e2e6febc5a0905a437e56dab89de', operation='INSERT', pgid='pgtrigger_insert_insert_66883', table='parks_park', when='AFTER')),
        ),
        pgtrigger.migrations.AddTrigger(
            model_name='park',
            trigger=pgtrigger.compiler.Trigger(name='update_update', sql=pgtrigger.compiler.UpsertTriggerSql(condition='WHEN (OLD.* IS DISTINCT FROM NEW.*)', func='INSERT INTO "parks_parkevent" ("average_rating", "banner_image_id", "card_image_id", "closing_date", "closing_date_precision", "coaster_count", "created_at", "description", "email", "id", "is_test_data", "name", "opening_date", "opening_date_precision", "opening_year", "operating_season", "operator_id", "park_type", "pgh_context_id", "pgh_created_at", "pgh_label", "pgh_obj_id", "phone", "property_owner_id", "ride_count", "search_text", "size_acres", "slug", "source_url", "status", "timezone", "updated_at", "url", "website") VALUES (NEW."average_rating", NEW."banner_image_id", NEW."card_image_id", NEW."closing_date", NEW."closing_date_precision", NEW."coaster_count", NEW."created_at", NEW."description", NEW."email", NEW."id", NEW."is_test_data", NEW."name", NEW."opening_date", NEW."opening_date_precision", NEW."opening_year", NEW."operating_season", NEW."operator_id", NEW."park_type", _pgh_attach_context(), NOW(), \'update\', NEW."id", NEW."phone", NEW."property_owner_id", NEW."ride_count", NEW."search_text", NEW."size_acres", NEW."slug", NEW."source_url", NEW."status", NEW."timezone", NEW."updated_at", NEW."url", NEW."website"); RETURN NULL;', hash='dd10d0b79ed3bf1caca8d4ffb520cd0be298bc0d', operation='UPDATE', pgid='pgtrigger_update_update_19f56', table='parks_park', when='AFTER')),
        ),
    ]
