From 11d996d308cc8518fa810bc82a20c08fc62666a0 Mon Sep 17 00:00:00 2001 From: jgreenstevens Date: Fri, 22 Nov 2024 15:36:11 +0000 Subject: [PATCH] Add index to history table --- .../resources/db/migration/V3_1__Create_history_table.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/beekeeper-scheduler-apiary/src/main/resources/db/migration/V3_1__Create_history_table.sql b/beekeeper-scheduler-apiary/src/main/resources/db/migration/V3_1__Create_history_table.sql index 601f3bfa..c8f2f977 100644 --- a/beekeeper-scheduler-apiary/src/main/resources/db/migration/V3_1__Create_history_table.sql +++ b/beekeeper-scheduler-apiary/src/main/resources/db/migration/V3_1__Create_history_table.sql @@ -9,4 +9,7 @@ CREATE TABLE IF NOT EXISTS beekeeper_history ( housekeeping_status VARCHAR(50) NOT NULL, event_details TEXT, PRIMARY KEY (id) -); \ No newline at end of file +); + +ALTER TABLE beekeeper_history ADD INDEX `beekeeper_history_index_table_name_upper` ((upper(table_name))); +ALTER TABLE beekeeper_history ADD INDEX `beekeeper_history_index_status` (`housekeeping_status`);