Changes between Initial Version and Version 1 of SchemaEvolution


Ignore:
Timestamp:
01/13/09 09:20:17 (13 years ago)
Author:
tousigna
Comment:

explain some bits and bolts about the schema evolution

Legend:

Unmodified
Added
Removed
Modified
  • SchemaEvolution

    v1 v1  
     1== What is it about == 
     2It's to permit developer to be able to change the schema of the reporting database easily so the user does not need to worry about database changes and upgrades. It's also simplify the installation of the reporting system as it's create the tables for you. You'll still need to create the database before. 
     3 
     4== The way it work == 
     5To keep track of the revision of the database, it's create a new table with revision and the date of the upgrade. Then it's if the database is to be upgraded, it take the last revision in the database and compare them with the one in the [source:trunk/bcfg2/src/lib/Server/Reports/updatefix.py updatefix.py], if there is more revision, it will execute the new query. 
     6 
     7== What to do to add a new revision == 
     8To add a new modification to the database, you'll need to change the [source:trunk/bcfg2/src/lib/Server/Reports/updatefix.py updatefix.py] for the old database to be upgraded. Find the array _fixes and append a new query of function to it and it will be executed on the next restart of bcfg2 or import of xml file. You'll also need to add a new entry in the [source:trunk/bcfg2/src/lib/Server/Reports/reports/fixtures/initial_version.xml internal revision table] for the fresh installation of the reports system. 
     9 
     10== Modification since 0.9.5.6 ==  
     11 * '''Revision 0''' 
     12  * Merge the tables reports_bad, reports_modified and reports_extra in a single tables named reports_entries and remove all duplication of entries name 
     13  * Merge the interaction of all 3 table into a single one and typed the type of interaction as 1 for bad, 2 for modified and 3 for extra, so we could add new type of interactions. 
     14  * Moved the reason of interaction from the entries to the actual interaction with the entries.  
     15 * '''Revision 1''' 
     16  * Removed the un-necessary table reports_bad 
     17 * '''Revision 2''' 
     18  * Removed the un-necessary table reports_bad_interactions 
     19 * '''Revision 3'''  
     20  * Removed the un-necessary table reports_extra 
     21 * '''Revision 4'''  
     22  * Removed the un-necessary table reports_extra_interactions 
     23 * '''Revision 5''' 
     24  * Removed the un-necessary table reports_modified 
     25 * '''Revision 6''' 
     26  * Removed the un-necessary table reports_modified_interactions 
     27 * '''Revision 7''' 
     28  * Removed the deprecated table reports_repository 
     29 * '''Revision 8'''  
     30  * Removed the deprecated table reports_metadata  
     31 * '''Revision 9'''  
     32  * Added a columns to the reports_interaction to keep track of witch server did the importation on a multiple bcfg2 server network.