Changes between Version 10 and Version 11 of BluePrintUpgrades


Ignore:
Timestamp:
02/14/16 20:32:30 (6 years ago)
Author:
Pat Tressel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BluePrintUpgrades

    v10 v11  
    7474== Database Schema Changes ==
    7575
     76Since this is typically the most difficult change for a site to cope with, and the most dangerous
     77(since it risks data loss or corruption), it may be best to tackle this first.
     78
     79When the database schema changes in a way that requires conversion of the database, then we would
     80like to provide a script to perform the conversion.  This is not an unusual requirement.  For
     81instance, in a Ruby on Rails system, migration scripts are mandatory -- the schema is defined as
     82the result of applying all migration scripts in order.  In an Eden, or more generally, Web2py
     83system, the schema is defined directly, so there is no onus on the developer to write a migration
     84script.  Developers typically delete their database and reload sample data from csv files, so do
     85not have a need to migrate existing databases.  Thus, writing a migration script seems a burden.
     86
     87The goal is thus to assist the developer in producing migration scripts, which they would then
     88include along with the changes that necessitate the migration, when they submit those changes to
     89the main repository.
     90
     91A site performing an upgrade would then run an overall migration script that would create a copy
     92of the database, and apply all the individual migration scripts starting from the site's current
     93Eden revision, to the upgrade revision.  The site would then test using the new database, and if
     94ok, retire the previous database.
     95
     96Detailed discussion of database migration (originally for a GSoC project):  BluePrintDatabaseMigration
     97
     98GSoC 2012 database migration project:  [wiki:Event/2012/GSoC/DatabaseMigration Event/2012/GSoC/DatabaseMigration]
     99
     100Current state and more discussion:  BluePrint/DatabaseMigration
     101
    76102----
    77103BluePrints