You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Here's my issue - I'm going to run out of integers for my primary key
in one of my tables. I'm using MySQL, which has been absolutely
fantastic, and will for at least a few more decades if I can make a
change from INT to BIGINT.
What's the right way to switch from INT to BIGINT so the PK works
correctly?
/ First thought was a big, fat south migration, but I I wonder if
there's anything in Django's code that this will break?
Scott Gould
unread,
Oct 11, 2010, 8:22:27 AM10/11/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
With a huge whopping disclaimer that I've never done this before:
Wouldn't you simply be abe to add an explicit "id =
BigIntegerField(primary_key=True)" to the model and change the column
type accordingly in mysql?
derek
unread,
Oct 11, 2010, 8:25:27 AM10/11/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
Be aware that Django's sync method wil create the PK field with a
default of int(11), not bigint, so you'll need to change that in the
database itself.