From 8206e6260f415a629e59755cd1ba56940ceea4a9 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 11 Sep 2024 08:46:15 +0200 Subject: [PATCH] schema: add `last_state_change` to `redundancy_group_state` --- schema/mysql/upgrades/dependencies.sql | 1 + schema/mysql/upgrades/dependencies2.sql | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 schema/mysql/upgrades/dependencies2.sql diff --git a/schema/mysql/upgrades/dependencies.sql b/schema/mysql/upgrades/dependencies.sql index 261b9769a..bbfb38c0c 100644 --- a/schema/mysql/upgrades/dependencies.sql +++ b/schema/mysql/upgrades/dependencies.sql @@ -25,6 +25,7 @@ CREATE TABLE `redundancy_group_state` ( `id` binary(20) NOT NULL, `redundancy_group_id` binary(20) NOT NULL, `failed` enum('n', 'y') NOT NULL, + `last_state_change` bigint unsigned NOT NULL, UNIQUE INDEX `redundancy_group_state_redundancy_group_id_uindex` (redundancy_group_id), KEY `redundancy_group_state_redundancy_group_id_fk` (`redundancy_group_id`), CONSTRAINT `redundancy_group_state_redundancy_group_id_fk` FOREIGN KEY (`redundancy_group_id`) REFERENCES `redundancy_group` (`id`) diff --git a/schema/mysql/upgrades/dependencies2.sql b/schema/mysql/upgrades/dependencies2.sql new file mode 100644 index 000000000..364a137bd --- /dev/null +++ b/schema/mysql/upgrades/dependencies2.sql @@ -0,0 +1,2 @@ +alter table redundancy_group_state + add last_state_change bigint unsigned not null;