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

schema: Add dependency additions #795

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

schema: Add dependency additions #795

wants to merge 4 commits into from

Conversation

nilmerg
Copy link
Member

@nilmerg nilmerg commented Sep 2, 2024

As discussed in #347.

Todo:

  • Remove constraints
  • Rename keys
  • Add missing columns (environment_id etc)
  • Integrate into full schema file
  • Add PostgreSQL version

@nilmerg nilmerg self-assigned this Sep 2, 2024
@cla-bot cla-bot bot added the cla/signed label Sep 2, 2024
CREATE TABLE `redundancy_group_state` (
`id` binary(20) NOT NULL,
`redundancy_group_id` binary(20) NOT NULL,
`failed` enum('n', 'y') NOT NULL,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The redundancy_group_state table is missing last_state_change column, to track how long since the redundancy group has failed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that now it's there twice. Please refer to my other comment.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems I mixed things up here a bit. dependencies.sql was the initial script and seemingly intended as full upgrade whereas the other files, 2 and 3, are partial upgrades. Though changes made in 3 didn't made it into the full upgrade. :D

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For my testing, I have added the environment ID as environment_id BINARY(20) NOT NULL to most tables.

Comment on lines +1 to +2
alter table redundancy_group_state
add last_state_change bigint unsigned not null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

`last_state_change` bigint unsigned NOT NULL,

Unless I am missing something, it is already there.

CREATE TABLE `redundancy_group_state` (
`id` binary(20) NOT NULL,
`redundancy_group_id` binary(20) NOT NULL,
`failed` enum('n', 'y') NOT NULL,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that now it's there twice. Please refer to my other comment.

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.

3 participants