Changes between Version 4 and Version 5 of BluePrintDatabaseMigration

03/10/11 14:02:52 (13 years ago)
Pat Tressel



  • BluePrintDatabaseMigration

    v4 v5  
    2222* Determine which changes will be handled by Web2py without assistance.
    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).
     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.
     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.)
    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.
    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.
     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.
     51* Provide a way for a person to do any fixups or verification needed.
     53* Determine how the result of a conversion will be verified and tested.
    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.