18 | | Detect database schema and initial database content changes in Eden on each commit to trunk. This could be done as part of the continuous integration tests that are launched on each commit: Run Eden from scratch, which creates the database and adds initial data, then compare this with the result of the run from the last commit. Identify what changed and present a gui to the culprit so they can match up what they renamed (the most "popular" way to break backward compatibility), or say how new fields should be populated from old ones, or (failing a simple fixup) provide a migration script. Record the operations needed to convert a populated database to match the new schema and new initial contents across each revision. Provide a way for a sysadmin who has updated their copy of Eden to run the set of conversions from their previous revision to the new revision. |
| 18 | * Track database schema and initial database content changes in Eden on each commit to trunk. (This could be done as part of the continuous integration tests that are launched on each commit: Run Eden from scratch, which creates the database and adds initial data, then compare this with the result of the run from the last commit.) |
| 19 | |
| 20 | * Identify the differences between the old and new schemas, and old and new initial contents. |
| 21 | |
| 22 | * Determine which changes will be handled by Web2py without assistance. |
| 23 | |
| 24 | * For more significant changes, attempt to figure out how to convert from old to new schema. For instance: |
| 25 | * Attempt to match renamed tables by their fields, and renamed fields by their characteristics. Attempt to match fields moved out to new tables by names and characteristics. |
| 26 | * Determine if type changes might be automated, or partly automated (e.g. if a field's type changes from text to datetime). |
| 27 | |
| 28 | * Provide a gui that shows the schema changes and suggested fixups. Allow the user to: |
| 29 | * Confirm or alter matching of renamed elements. |
| 30 | * Say how new fields should be populated from old ones. |
| 31 | * Provide a migration script. |
| 32 | |
| 33 | * Record the operations needed to convert a populated database to match the new schema and new initial contents across each revision. |
| 34 | |
| 35 | * Provide a way for a sysadmin who has updated their copy of Eden to run the set of conversions from their previous revision to the new revision. |