django-robots icon indicating copy to clipboard operation
django-robots copied to clipboard

Solve MakeMigration issue with MySql

Open pooja-narwade opened this issue 2 years ago • 2 comments

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.

pooja-narwade avatar Dec 17 '22 10:12 pooja-narwade

Is this potentially related to #124?

Does django-robots 6.0 or 6.1 resolve this?

tony avatar Sep 07 '23 12:09 tony

@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?

tony avatar Dec 09 '23 13:12 tony