[ 
http://mifosforge.jira.com/browse/MIFOS-2896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Monsen updated MIFOS-2896:
-------------------------------

    Description: 
All current database upgrades must have a sequence number. This prevents 
branch-based schema changes. We were originally looking at Liquibase to solve 
this problem, but we now believe that the following can be done to add 
non-sequential database upgrades to Mifos:

* register every database upgrade in DatabaseVersionPersistence, including 
SQL-only upgrade scripts
* use the current UNIX timestamp as the unique name for each database upgrade 
script. This provides a monotonically increasing number that is sufficiently 
unique so upgrades on branches should not conflict
* in database_version (or a table named, for instance, "applied_upgrades") 
store the name (a UNIX timestamp) of every upgrade applied thus far. Upon 
startup, any upgrades not present in that table are applied.
* the upgrade functionality (and associated tests) must be modified to support 
upgrades in sequence, such that, given database versions "1", "2", and "3", I 
can, on a branch, insert upgrade "2-v1.5.x", and specify that this upgrade must 
be applied after "2" and before "3".
* figure out how to gracefully handle merging acceptance test datasets (person 
doing merge must run upgrade script? make sure this works)

  was:
All current database upgrades must have a sequence number. This prevents 
branch-based schema changes. We were originally looking at Liquibase to solve 
this problem, but we now believe that the following can be done to add 
non-sequential database upgrades to Mifos:

* register every database upgrade in DatabaseVersionPersistence, including 
SQL-only upgrade scripts
* give each upgrade a unique name (can be anything... for simplicity, use the 
existing database version numbers)
* the upgrade functionality (and associated tests) must be modified to support 
upgrades in sequence, such that, given database versions "1", "2", and "3", I 
can, on a branch, insert upgrade "2-v1.5.x", and specify that this upgrade must 
be applied after "2" and before "3".


> Non-sequential database upgrade
> -------------------------------
>
>                 Key: MIFOS-2896
>                 URL: http://mifosforge.jira.com/browse/MIFOS-2896
>             Project: mifos
>          Issue Type: Improvement
>    Affects Versions: Shamim D
>            Reporter: Tejus Datta
>            Priority: Major
>
> All current database upgrades must have a sequence number. This prevents 
> branch-based schema changes. We were originally looking at Liquibase to solve 
> this problem, but we now believe that the following can be done to add 
> non-sequential database upgrades to Mifos:
> * register every database upgrade in DatabaseVersionPersistence, including 
> SQL-only upgrade scripts
> * use the current UNIX timestamp as the unique name for each database upgrade 
> script. This provides a monotonically increasing number that is sufficiently 
> unique so upgrades on branches should not conflict
> * in database_version (or a table named, for instance, "applied_upgrades") 
> store the name (a UNIX timestamp) of every upgrade applied thus far. Upon 
> startup, any upgrades not present in that table are applied.
> * the upgrade functionality (and associated tests) must be modified to 
> support upgrades in sequence, such that, given database versions "1", "2", 
> and "3", I can, on a branch, insert upgrade "2-v1.5.x", and specify that this 
> upgrade must be applied after "2" and before "3".
> * figure out how to gracefully handle merging acceptance test datasets 
> (person doing merge must run upgrade script? make sure this works)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://mifosforge.jira.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------

_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues

Reply via email to