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

Change table definition for vcpus field for the cloud_resource_specs table #1361

Merged

Conversation

eiffel777
Copy link
Contributor

The vcpus field for the cloud_resource_specs table had the nullable property set to be true. This is incorrect and in MySQL 5.7 or higher causes an error since this field is part of the primary key.

xdmod.jobs-cloud-common.CloudTableManagement (ETL\Maintenance\ManageTables): Error managing ETL table `modw_cloud`.`cloud_resource_specs`: SQLSTATE[42000]: Syntax error or access violation: 1171 All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead

Setting the field to be nullable: false fixes the problem

Tests performed

Tested manually

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project as found in the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@eiffel777 eiffel777 added bug Bugfixes Category:Cloud Cloud Realm labels Jul 1, 2020
@eiffel777 eiffel777 added this to the 9.0.0 milestone Jul 1, 2020
@eiffel777 eiffel777 requested a review from plessbd July 1, 2020 13:23
@eiffel777 eiffel777 self-assigned this Jul 1, 2020
@jpwhite4
Copy link
Member

jpwhite4 commented Jul 1, 2020

Is it possible that there could be null values in the table from an earlier XDMoD version?

@eiffel777
Copy link
Contributor Author

@jpwhite4 This table was added in the cloud utilization PR(#1242) and doesn't exist in previous version of XDMoD that should not be something that needs to be worried about, unless I am misunderstanding your question.

@eiffel777 eiffel777 merged commit 900ceea into ubccr:xdmod9.0 Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugfixes Category:Cloud Cloud Realm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants