Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Modify all models + migrations to have `stripe_id` be VARCHAR(191) #350
The max length for a key field in MySQL is 767 Bytes. A
For some context on the issue I'm having, trying to run pinax-stripe migrations on our django instance is resulting in the following OperationalError:
The Motivation section above is informed entirely by https://stackoverflow.com/questions/1814532/1071-specified-key-was-too-long-max-key-length-is-767-bytes.
But Alex, you modified a migration? Isn't that bad?
Patching the migration with a new one would still result in the same failure I show above because it will still try to create the tables with the
For those already using pinax-stripe in production environments, they won't notice any difference -- for those trying to get it started in their own environment, they shouldn't run into this problem now...
For databases with character encodings with bytes-per-char larger than utf8, 255 is too large a VARCHAR length for the 1000 byte limit MySQL imposes on keys. Reducing this to 191 allows the `stripe_id` field to be a unique key in utf8mb4, a common upgrade to utf8 that has more bytes-per-char.
The migration will already exist in their