cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Tutkowski <>
Subject Re: [DB-CHANGE]
Date Tue, 08 Jul 2014 04:11:38 GMT
Thanks, Alena!

For those of you who may be new to the [DB-CHANGE] tag, the idea, as the
tag implies, is that a developer has changed the schema of the DB. In an
effort to help you not to have an issue after fetching his/her change, the
developer is telling you how you can alter your DB so you don't have to
completely scratch your existing cloud (due to an incompatibility between
the code and the DB) and create it from scratch again.

This typically happens on the master branch as that branch is the most
susceptible to these kinds of changes during development and there is no
script that we maintain to upgrade a DB of the same [major.minor] version.

On Mon, Jul 7, 2014 at 5:36 PM, Alena Prokharchyk <> wrote:

> Please run these mysql statements after getting commit
> 5a96d8ef5cbc88df366016ae9dd7ee46e4ca417a on master branch:
> ALTER TABLE `cloud`.`user` ADD COLUMN domain_id bigint(20) unsigned
> ALTER TABLE `cloud`.`user` ADD CONSTRAINT `fk_user__domain_id` FOREIGN KEY
> `fk_user__domain_id`(`domain_id`) REFERENCES `domain`(`id`) ON DELETE
> UPDATE `cloud`.`user` SET `cloud`.`user`.domain_id=(SELECT
> `cloud`.`account`.domain_id   FROM `cloud`.`account`   WHERE
> `cloud`.`account`.id=`cloud`.`user`.account_id) where id > 0;
> ALTER TABLE `cloud`.`user` ADD UNIQUE KEY `username_domain_id`
> (`username`,`domain_id`);
> -alena.

*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
o: 303.746.7302
Advancing the way the world uses the cloud

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message