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 6 commits into
base: main
Choose a base branch
from
Draft

schema: Add dependency additions #795

wants to merge 6 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.

schema/mysql/upgrades/dependencies2.sql Show resolved Hide resolved
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.

@nilmerg
Copy link
Member Author

nilmerg commented Nov 28, 2024

I've cleaned it up. dependencies_full.sql now contains all additions. The numbered files are partial upgrades.

Also, I've added redundancy_group_state.is_reachable.

@nilmerg nilmerg mentioned this pull request Dec 2, 2024
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