| | 28 | Expected issues beyond the above, that can arise if the site has code modifications, are: |
| | 29 | |
| | 30 | * An API change may require the site to alter their code to use the modified API. |
| | 31 | * Alteration by the site of code outside of the site's template may lead to merge conflicts. |
| | 32 | * If both the site and upgrade have database schema changes, then those changes need to be reconciled and merged. |
| | 33 | |
| | 34 | Of these issues, the most potentially destructive is a database schema change, as without proper preparation, |
| | 35 | running the upgraded version of Eden can lead to data loss. The Web2py migration does not understand changes |
| | 36 | such as renaming a column -- that is interpreted as deleting a column and adding a new one. This can happen |
| | 37 | regardless of whether the site has made any changes whatsoever in their code. Also, requiring the sysadmin to |
| | 38 | investigate the upgrade's schema changes, and write scripts to convert their database, is a significant burden. |
| | 39 | Addressing database migration is thus likely to be the largest reduction in upgrade effort. |
| | 40 | |
| | 41 | Support for upgrades can proceed in stages: |
| | 42 | |
| | 43 | * Deal with the case in which there are no significant site code changes. |
| | 44 | That is, changes are limited to configuration and relatively cosmetic UI changes. |
| | 45 | * Assume additional changes are confined to the site's template, but may include use of a now-deprecated |
| | 46 | or altered API. |
| | 47 | * Deal with site database schema changes. |
| | 48 | * Consider what can be done to ease conflict resolution in UI code. |
| | 49 | * Likewise, for conflict resolution in model and controller code, beyond schemas. |
| | 50 | |
| | 51 | Some potential conflicts may be avoided up front by convincing sites not to alter framework code, and to avoid |
| | 52 | directly editing models and controllers. For changes that may be of benefit to other users, encourage sites to |
| | 53 | make their changes generic and contribute them back to the main repository. |
| | 54 | |
| | 55 | Here, we consider the first stage, in which the upgrade issues are due to changes in Eden rather than in site |
| | 56 | changes. Since directory layout changes are rare, this can be deferred until such a change is planned. |
| | 57 | |
| | 58 | == Configuration Changes == |
| | 59 | |
| | 60 | == Database Schema Changes == |