forked from Icinga/icingaweb2-module-director
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Icinga#2885 Fix MySQL8.4 nonstandard foreign keys deprecation
If you try to set up icinga director with the latest minor version of MySQL 8.4+, the schema creation will fail with confusing SQL error messages. This commit aims to fix that. https://dev.mysql.com/doc/refman/8.4/en/mysql-nutshell.html#mysql-nutshell-deprecations
- Loading branch information
Showing
2 changed files
with
20 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ALTER TABLE director_activity_log | ||
ADD UNIQUE INDEX idx_checksum (checksum); | ||
|
||
ALTER TABLE director_generated_config | ||
ADD CONSTRAINT fk_director_generated_config_activity | ||
FOREIGN KEY (last_activity_checksum) | ||
REFERENCES director_activity_log(checksum) | ||
ON DELETE RESTRICT | ||
ON UPDATE RESTRICT; | ||
|
||
INSERT INTO director_schema_migration | ||
(schema_version, migration_time) | ||
VALUES (188, NOW()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters