Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the limits from the tables in sorted order #179

Merged
merged 1 commit into from
Mar 16, 2018

Conversation

carbonin
Copy link
Member

This will prevent us from trying to alter an inherited column in a table like metrics_01 or similar.

Without this change a migration can fail with the following output:

When launching rake db:migrate we get the following error:
-- change_column("metric_rollups_01", "resource_type", :string, {:limit=>nil})
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::InvalidTableDefinition: ERROR:  cannot alter inherited column "resource_type"
: ALTER TABLE "metric_rollups_01" ALTER COLUMN "resource_type" TYPE character varying

This will prevent us from trying to alter an inherited column
in a table like metrics_01 or similar
@miq-bot
Copy link
Member

miq-bot commented Mar 16, 2018

Checked commit carbonin@d5413fd with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. ⭐

@Fryguy
Copy link
Member

Fryguy commented Mar 16, 2018

Wow interesting!

I'm marking this gaprindashvili/yes because even though it's a migration, it's not a new migration...just a bug fix.

@Fryguy Fryguy merged commit 565c01f into ManageIQ:master Mar 16, 2018
@Fryguy Fryguy added this to the Sprint 82 Ending Mar 26, 2018 milestone Mar 16, 2018
@Fryguy Fryguy self-assigned this Mar 16, 2018
@carbonin
Copy link
Member Author

simaishi pushed a commit that referenced this pull request Mar 20, 2018
Remove the limits from the tables in sorted order
(cherry picked from commit 565c01f)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1558626
@simaishi
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit 73f1f7633ae4ffa726c1fceec92c42465500429a
Author: Jason Frey <fryguy9@gmail.com>
Date:   Fri Mar 16 12:04:36 2018 -0400

    Merge pull request #179 from carbonin/sort_tables_before_removing_limits
    
    Remove the limits from the tables in sorted order
    (cherry picked from commit 565c01f3b9282952bb4e6d38316222dbed5ee77f)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1558626

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants