-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kezabelle test case 992 #1042
Kezabelle test case 992 #1042
Conversation
I don't really know the details of the decision to change the way table name generation occurs, so I can't really comment on the pros and cons, but as I see it, this is still kind of a painful solution, though (for all I know - it is beyond my understanding) it may be the only one available.
|
I agree that the whole table-renaming mess sucks. However, we can't easily change this without breaking backwards compatibility in a spectacular and annoying way. So unfortunately, removing the 'cmsplugin_' prefix won't be possible. I still blame @piquadrat for this :D The initial idea was to rename the core plugins (eg 'text') to 'cmsplugin_text'. The idea was to change the appname (as in physically move the subfolder and write a smart migration), not monkeypatching table names. So now we pollute the Django namespace with super generic names ('text', 'picture', 'link') on top of messing with ORM internals... What is the exact changeset in 2.2 that is backwards incompatible? |
In 2.1.x, the table name only got prefixed with Now, the 2.2 changes are forcing it to unilaterally apply If I'm reading that correctly, and the intention is to always prepend the table name with the cmsplugin prefix, then it is for better or worse, backwards incompatible for some people, even if it is the result of edge cases slipping through previous version. Hence, if my Does that make sense? Am I even right? I don't know anymore :o) |
All sounds correct to me. The intention of my changes were to be consistent. But compatibility is a good reason not to change that. Still wish we could drop the whole thing :( |
@piquadrat: I hope you (and everyone else) noticed the ":D" at the end. Text just sucks as a medium to indicate that certain parts of it are not intended seriously. So just to make this clear: It's not actually piquadrats fault, and it doesn't matter who's it is. We just need to find a way to make this somewhat work. |
@kezabelle: what's the least intrusive way to handle this (as in: not breaking backwards compatiblity?) |
I can't, at the moment, see a solution that would get back to complete 2.1.x compatibility, because by it's nature this is attempting to correct for historic slips through the cracks. The only way I can see to account for the edge case of having used something completely incongruous like At least one of the original reports (in #992) was able to fix it for themselves by checking whether cmsplugin was already in the name, which indicates that the problem would be solved for them. It'd be interesting to see what @ajmirsky's declared table names were -- there is the possibility that we're striving for backwards compatibility for an edge case that people aren't encountering; if that's the case, it may not be worth the effort [nor code complexity] to do more than note it in the docs as a change, and leave the problem to the developers who've so woefully abused table names. |
since this pull request seems to make things even worse, I'm closing it. |
re-opened after discussion with @kezabelle on IRC |
compatible way to go. See mailing list for discussion about the future.
To confirm then, the new changeset only does the following:
This certainly seems to return the functionality one could expect of 2.1.x postscript editI've just thought - while this should return the functionality of the previous version, it does still mean, at least in theory, the db_table may not be the configured value, in the instance where the user has specifically hard-coded the db_table to the same values as those computed? (ie: beginning with app_label) That, however, is still what the previous version did, and I don't think anyone's ever raised a ticket for it. |
the goal of this ticket is to fix #992 and remain as backwards compatible as possible. The fact is that being backwards compatible means messing around with db_table. |
Fix proposed by kezabelle (#992 (comment)) slightly edited to always force a 'cmsplugin_' in front of plugin tables. if we do this kind of magic, let's do it consistently.