I would like to suggest that we use new tables when merging snippet/chunk/etc and users:
example
{prefix}_widgets
{prefix}_users
{prefix}_user_attributes
{prefix}_user_roles
PROs:
This way we will not break existing system that rely on the old tables. We should provide the user with an option to remove old data tables if they are present. This approach will also give the user enough time to gradually update their apps to use the new tables.
CONs:
Duplicate data will exist within the database until old tables are removed.
-
MODX Staff
- 10,725 Posts
Agreed, and I’d really like the chance to review any structures we come up with for this, so we can optimize the structures appropriately. Currently, I see a wealth of issues in our db structures that could be improved (using proper column types, indexes, and more).
-
MODX Staff
- 12,272 Posts
I am all for a smooth transition and think extra tables is a great safety measure too!
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
-
MODX Staff
- 10,725 Posts
Alright, that said, who is doing what? I’d like to suggest we track these refactorings as feature requests in Flyspray. That way we know at least relatively who’s doing what to which code. As of now, I plan on doing the majority of the user merge work, so I’ll add a task for this to Flyspray and assign myself to it.
Also, I want to do this merging with an eye towards database abstraction. Try and refactor as much code as you can to use the DBAPI methods for queries, so we can identify weaknesses and needed additions to that API, as well as adding postgreSQL support as a first case as soon as possible following these merges.
-
MODX Staff
- 10,725 Posts
Actually, I’m going to add Merge Web and Manager Users as a To Do task in Flyspray, to separate it from feature requests (since we internally decided to do this).
I would like to handle the merging of the widgets. I’m going to see if I can make some progress in that direction tomorrow. If I get too tied up with other things then someone else may have to take over though.
-
MODX Staff
- 12,272 Posts
How’s the widget merging going Adam?
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me