Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes length of Request.path and Request.view_name fields (#167)
Adds support for `utf8` and `utf8mb4` character sets in MySQL's default configuration. Closes #38.
- Loading branch information
Showing
2 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d7ebda5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a questions in mind, does changing existing migrations in this way good for existing projects? won't they break? what about removing all migrations and regenerate and make a new major release? or this way works fine?
d7ebda5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@auvipy You are correct. This change will likely break existing installs of this library. Some, but not all. This will go out as a major release. I will make sure release notes to alert people who upgrade to the new release. Usually major releases have an understanding that it contains breaking changes.
d7ebda5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@auvipy @avelis Actually I suspect this change will impact few existing users, if any.
Those with fully working existing Silk installations fall into one of the following categories:
silk_request
table, manually created the required indexes, and finally faked the initial migration to get Silk installed.In each of these cases, changing the initial migration should have no affect, because Django thinks that it has already applied it and so won't do anything during the next migration. If the user rolls back Silk to the zero state, then all data will be lost and the
silk_request
table will be created with the new column lengths above, but rolling back to zero will cause this data loss with or without this change anyway.The other group of users are those using MySQL with partially working installations (i.e. Django created the tables and columns but failed to create the indexes on
silk_request
because MySQL wouldn't allow it). These users should also be unaffected: their Silk installation will perform poorly both before and after this change because of the missing indexes. Again, Django will make no changes because it thinks that the initial migration is already applied. If Django thinks the initial migration has NOT been applied then Silk already won't be working at all for these users.I think overall this can only increase adoption by making Silk usable out-of-the-box for MySQL users who use Unicode - at the moment they can't install it at all without manually reconfiguring things at the database level.
d7ebda5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your detail explanation. I am convinced. thanks again for following the sensible way