# Generated by Django 5.1.1 on 2024-09-16 23:45

from django.db import migrations


class Migration(migrations.Migration):

    dependencies = [
        ('spidersweb', '0004_websitexpath_record_id'),
    ]

    operations = [
            # Then, run raw SQL to change it to BIGINT UNSIGNED
            migrations.RunSQL(
                sql="""
                    ALTER TABLE `spidersweb_websitexpath`
                    MODIFY COLUMN `record_id` BIGINT UNSIGNED,
                    ADD CONSTRAINT `websitexpath_record_fk`
                    FOREIGN KEY (`record_id`)
                    REFERENCES `records` (`id`)
                    ON DELETE CASCADE;
                """,
                reverse_sql="""
                    ALTER TABLE `spidersweb_websitexpath`
                    DROP FOREIGN KEY `websitexpath_record_fk`,
                    MODIFY COLUMN `record_id` BIGINT;
                """
            ),
        ]
