Changes between Version 4 and Version 5 of BluePrintDatabaseMigration


Ignore:
Timestamp:
03/10/11 14:02:52 (14 years ago)
Author:
Pat Tressel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BluePrintDatabaseMigration

    v4 v5  
    2222* Determine which changes will be handled by Web2py without assistance.
    2323
    24 * For more significant changes, attempt to figure out how to convert from old to new schema.  For instance:
     24* For more significant schema changes, attempt to figure out how to convert from old to new schema.  For instance:
    2525 * 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.
    2626 * Determine if type changes might be automated, or partly automated (e.g. if a field's type changes from text to datetime).
     27
     28* Catalog differences in the initial contents of the database.
     29 * Attempt to identify which records are no longer included, which are new, and which are modified.
     30
     31* Determine if there will be changes that must be performed or verified by a human after conversion. (E.g. in the datetime conversion example, it is possible that some conversions will fail -- these will likely need to be fixed up by hand.)
    2732
    2833* Provide a gui that shows the schema changes and suggested fixups.  Allow the user to:
    2934 * Confirm or alter matching of renamed elements.
    3035 * Say how new fields should be populated from old ones.
    31  * Provide a migration script.
     36 * Say how data with type changes should be transformed.
     37 * Provide a migration script for more complex conversions.
    3238
    33 * Record the operations needed to convert a populated database to match the new schema and new initial contents across each revision.
     39* Devise a way to record the operations needed to convert a database from one revision to the next.
     40
     41* Provide the mechanism for actually converting a database from one revision to the next.  For instance:
     42 * Dump or back up the current database as a precaution.
     43 * Make a dump to use in the conversion process.
     44 * Determine if there is data that is affected by the changes.
     45  * Is there data in the altered tables?
     46  * Does anything depend on the altered initial contents?
     47 * Determine which changes are better made by editing the dump, and which are better made with database operations. (Note that for each revision, it is likely that this will need to be done entirely by editing the dump, or entirely by database operations, else one would have to construct an intermediate schema to load the altered dump into, to continue conversion with database commands.)
     48  * If editing the dump, do so, create a new database with the new schema, and load the modified contents.
     49  * If using database operations, create a new database with the old schema, load the existing dump, and alter the database.
     50
     51* Provide a way for a person to do any fixups or verification needed.
     52
     53* Determine how the result of a conversion will be verified and tested.
    3454
    3555* 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.