[Vtigercrm-developers] RFC: schema versioning

Enrico Weigelt weigelt at metux.de
Tue May 8 12:34:33 PDT 2007


Hi folks,


as some of you probably might have realized that upgrading 
database schema is an very tricky issue. 

I don't believe that an universal schema generator and updater, 
which really *WORKS* can be built with reasonable effort, at 
least not if the RDBMS should not just be abused as spreadsheet
storage. 

The various RDBMS'es *are* different and so require different
schemata. The big problem is not writing proper SQL commands,
but keeping track of current schema version and find the 
right commands for update.

So my suggestion:

* add an new table "schema_version" which contains an list 
  of schema components (identified by some unique name) 
  and their current version (which is an sequential number).

* schema updates are done, for each component separately, 
  strictly sequential. each RDBMS has its own SQL scripts.
  
  
cu
-- 
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service

  phone:     +49 36207 519931         www:       http://www.metux.de/
  fax:       +49 36207 519932         email:     contact at metux.de
  cellphone: +49 174 7066481
---------------------------------------------------------------------
 -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops --
---------------------------------------------------------------------



More information about the vtigercrm-developers mailing list