jazzband / django-robots

A Django app for managing robots.txt files following the robots exclusion protocol
https://django-robots.readthedocs.io
BSD 3-Clause "New" or "Revised" License
459 stars 99 forks source link

Solve MakeMigration issue with MySql #144

Open pooja-narwade opened 1 year ago

pooja-narwade commented 1 year ago

django-robots version 5.0 I am using above version of django-robots. When database is SQLite, things are working fine but when the database is MySQL, it gives following error while running migrate command.

Error: django.db.utils.OperationalError: (3780, "Referencing column 'rule_id' and referenced column 'id' in foreign key constraint 'robots_rule_sites_rule_id_7921a799_fk_robots_rule_id' are incompatible.")

I investigate and figure out that the BigAutoField is causing the problem.

tony commented 1 year ago

Is this potentially related to #124?

Does django-robots 6.0 or 6.1 resolve this?

tony commented 11 months ago

@pooja-narwade Is this still an issue in django-robots 6.0? Does this apply to master as it is now?

I think - it may be this PR was made after a fix was merged to master and 6.0b0 was prereleased, but before 6.0 was released:

image

via django-robots' release history.

Maybe this PR is helpful based on where 5.0 was, but in this circumstance master may already have overcame the issue by that time. What do you think?