You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Alena Prokharchyk <Al...@citrix.com> on 2014/07/08 01:36:41 UTC

[DB-CHANGE]

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.

Re: [DB-CHANGE]

Posted by Daan Hoogland <da...@gmail.com>.
please note that similar work was done by Alex:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Mailing+List+Guidelines
We should unify this.

On Tue, Jul 8, 2014 at 6:52 PM, Alena Prokharchyk
<Al...@citrix.com> wrote:
> Yes! :) Thank you and Daan who added the page.
>
> -Alena.
>
> From: Mike Tutkowski <mi...@solidfire.com>>
> Date: Tuesday, July 8, 2014 at 9:45 AM
> To: Alena Prokharchyk <al...@citrix.com>>
> Cc: "dev@cloudstack.apache.org<ma...@cloudstack.apache.org>" <de...@cloudstack.apache.org>>
> Subject: Re: [DB-CHANGE]
>
> I think this is what you are asking for:
>
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/mail+tags+to+use+to+help+each+other
>
>
> On Tue, Jul 8, 2014 at 10:38 AM, Alena Prokharchyk <Al...@citrix.com>> wrote:
> 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" <mi...@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<ma...@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<ma...@solidfire.com>
>>o: 303.746.7302<tel:303.746.7302>
>>Advancing the way the world uses the cloud
>><http://solidfire.com/solution/overview/?video=play>* *
>
>
>
>
> --
> Mike Tutkowski
> Senior CloudStack Developer, SolidFire Inc.
> e: mike.tutkowski@solidfire.com<ma...@solidfire.com>
> o: 303.746.7302
> Advancing the way the world uses the cloud<http://solidfire.com/solution/overview/?video=play>™



-- 
Daan

Re: [DB-CHANGE]

Posted by Alena Prokharchyk <Al...@citrix.com>.
Yes! :) Thank you and Daan who added the page.

-Alena.

From: Mike Tutkowski <mi...@solidfire.com>>
Date: Tuesday, July 8, 2014 at 9:45 AM
To: Alena Prokharchyk <al...@citrix.com>>
Cc: "dev@cloudstack.apache.org<ma...@cloudstack.apache.org>" <de...@cloudstack.apache.org>>
Subject: Re: [DB-CHANGE]

I think this is what you are asking for:

https://cwiki.apache.org/confluence/display/CLOUDSTACK/mail+tags+to+use+to+help+each+other


On Tue, Jul 8, 2014 at 10:38 AM, Alena Prokharchyk <Al...@citrix.com>> wrote:
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" <mi...@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<ma...@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<ma...@solidfire.com>
>o: 303.746.7302<tel:303.746.7302>
>Advancing the way the world uses the cloud
><http://solidfire.com/solution/overview/?video=play>* *




--
Mike Tutkowski
Senior CloudStack Developer, SolidFire Inc.
e: mike.tutkowski@solidfire.com<ma...@solidfire.com>
o: 303.746.7302
Advancing the way the world uses the cloud<http://solidfire.com/solution/overview/?video=play>™

Re: [DB-CHANGE]

Posted by Mike Tutkowski <mi...@solidfire.com>.
I think this is what you are asking for:

https://cwiki.apache.org/confluence/display/CLOUDSTACK/mail+tags+to+use+to+help+each+other


On Tue, Jul 8, 2014 at 10:38 AM, Alena Prokharchyk <
Alena.Prokharchyk@citrix.com> wrote:

> 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" <mi...@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>* *
>
>


-- 
*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>*™*

Re: [DB-CHANGE]

Posted by Alena Prokharchyk <Al...@citrix.com>.
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" <mi...@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>**


Re: [DB-CHANGE]

Posted by Mike Tutkowski <mi...@solidfire.com>.
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>*™*