Hi guys,
Here are some of my ideas:
1. I don't believe we should use the same Revision numbers for SQL and PHP upgrades. Instead I propose have 2 and they can run their own numbers. I realized that SQLs are more independent which means usually they are used just for DB changes in structure and sometimes in content while PHP upgrades are more sophisticated (can easily do DB structure and content + custom content changes like images/files copy/delete/move) and should be allowed to be run on it's own.
This rises a couple of questions:
a. Who's (PHP or DB upgrades) will be running first during OnDeploy event? I believe PHP upgrades should be the one that have more control and can be run first. Possibly we want to trigger SQL ALTERS within themselves.
b. How do we track PHP upgrade? I say the same way we do with DB Revisions - store in DB - under the module in new column.
2. Another idea (not sure if good one) to use single upgrade functionality:
What if we make it more simple and just move to a single Upgrade structure when we have PHP upgrades controlling and doing SQL execution as needed - basically move things from SQL file into PHP and create new PHP method the same way we do with SQL upgrades file now. The idea is that we have much more control in PHP file and probably will not need to thing about BEFORE and AFTER scenarios at all.
What do you think?
DA