Then you have to create your own branch forked from 4.10.0 In our branch, I moved some table changes (eg ALTER TABLE, CREATE TABLE) from schema-****.sql to engine/schema/src/com/cloud/upgrade/dao/UpgradeXXXtoYYY.java. If SQLException is throwed, then show a warning message instead upgrade interruption.. By this way, the database will not be broken in the upgrade or fresh installation.
-Wei 2017-02-14 11:52 GMT+01:00 Jeff Hair <j...@greenqloud.com>: > Hi all, > > Many people in the CS community maintain forks of CloudStack, and might > have implemented features or bug fixes long before they get into mainline. > I'm curious as to how people handle database migrations with their forks. > To make a DB migration, the CS version must be updated. If a developer adds > a migration to their fork on say, version 4.8.5. Later, they decide to > upgrade to 4.10.0 which has their migration in the schema upgrade to > 4.10.0. > > How do people handle this? As far as I know, CS will crash on the DB > upgrade due to SQL errors. Do people just sanitize migrations when they > pull from downstream or somehting? > > Jeff >