cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alena Prokharchyk <Alena.Prokharc...@citrix.com>
Subject Re: [DB-CHANGE]
Date Tue, 08 Jul 2014 16:38:49 GMT
Thank you, Mike!

Do you know if this information is on the wiki somewhere? It would be
helpful to gather all the tags in some place central, so we all know what
to put in the subject for diff kinds of updates/requests.

-alena.

On 7/7/14, 9:11 PM, "Mike Tutkowski" <mike.tutkowski@solidfire.com> wrote:

>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 <
>Alena.Prokharchyk@citrix.com> wrote:
>
>> Please run these mysql statements after getting commit
>> 5a96d8ef5cbc88df366016ae9dd7ee46e4ca417a on master branch:
>>
>> ALTER TABLE `cloud`.`user` ADD COLUMN domain_id bigint(20) unsigned
>> DEFAULT NULL;
>> ALTER TABLE `cloud`.`user` ADD CONSTRAINT `fk_user__domain_id` FOREIGN
>>KEY
>> `fk_user__domain_id`(`domain_id`) REFERENCES `domain`(`id`) ON DELETE
>> CASCADE;
>> 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.*
>e: mike.tutkowski@solidfire.com
>o: 303.746.7302
>Advancing the way the world uses the cloud
><http://solidfire.com/solution/overview/?video=play>**


Mime
View raw message