GitHub user remibergsma opened a pull request:

    https://github.com/apache/cloudstack/pull/164

    Upgrades from 4.4: disable foreign key checks when altering them

    Upgrades from 4.4 where not working properly due to errors like this:
    
    ERROR 1833 (HY000): Cannot change column 'id': used in a foreign key 
constraint 'fk_global_load_balancing_rules_region_id' of table 
'cloud.global_load_balancing_rules'
    
    The disabling of the checks is for the current session only, so it's safe.
    
    @bhaisaab: Could you have a look since I changed your code? Thanks!
    
    Note: In the 4.4 branch, this file used to be at:
    client/target/utilities/scripts/db/db/schema-442to450.sql
    It's now moved. We need to edit it in 4.4 and 4.5 to have it effective for 
all upgrade paths.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/remibergsma/cloudstack 4.4-upgrade-sql

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/164.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #164
    
----
commit 8721ea4259a6d9a2bc862eea6c6cc9c149cd793e
Author: Remi Bergsma <git...@remi.nl>
Date:   2015-04-13T21:38:17Z

    disable foreign key checks when altering them
    
    Upgrades from 4.4 where not working properly due to errors like this:
    ERROR 1833 (HY000): Cannot change column 'id': used in a foreign key 
constraint 'fk_global_load_balancing_rules_region_id' of table 
'cloud.global_load_balancing_rules'
    
    The disabling of the checks is for the current session only, so it's safe.
    
    In the 4.4 branch, this file used to be at:
    client/target/utilities/scripts/db/db/schema-442to450.sql
    
    It's now moved. We need to edit it in 4.4 and 4.5 to have it effective.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to