From 03cf05f8958768c659291bb4aeee7035b61812aa Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 4 Sep 2018 15:17:44 +0200 Subject: misc/database-layout.dump: foreign keys referencing `versions` --- misc/database-layout.dump | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'misc') diff --git a/misc/database-layout.dump b/misc/database-layout.dump index c8fedbb..7a2f775 100644 --- a/misc/database-layout.dump +++ b/misc/database-layout.dump @@ -681,9 +681,11 @@ dependencies CREATE TABLE `dependencies` ( UNIQUE KEY `content` (`dependent`,`depending_on`,`dependency_type`,`version`,`version_relation`), KEY `dependencies_ibfk_2` (`depending_on`), KEY `dependencies_ibfk_3` (`dependency_type`), + KEY `version` (`version`), CONSTRAINT `dependencies_ibfk_1` FOREIGN KEY (`dependent`) REFERENCES `binary_packages` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `dependencies_ibfk_2` FOREIGN KEY (`depending_on`) REFERENCES `install_targets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `dependencies_ibfk_3` FOREIGN KEY (`dependency_type`) REFERENCES `dependency_types` (`id`) ON DELETE CASCADE ON UPDATE CASCADE + CONSTRAINT `dependencies_ibfk_3` FOREIGN KEY (`dependency_type`) REFERENCES `dependency_types` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `dependencies_ibfk_4` FOREIGN KEY (`version`) REFERENCES `versions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci dependency_types CREATE TABLE `dependency_types` ( `id` smallint(6) NOT NULL AUTO_INCREMENT, @@ -765,8 +767,10 @@ install_target_providers CREATE TABLE `install_target_providers` ( PRIMARY KEY (`id`), UNIQUE KEY `content` (`package`,`install_target`,`version`), KEY `install_target_providers_ibfk_2` (`install_target`), + KEY `version` (`version`), CONSTRAINT `install_target_providers_ibfk_1` FOREIGN KEY (`package`) REFERENCES `binary_packages` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `install_target_providers_ibfk_2` FOREIGN KEY (`install_target`) REFERENCES `install_targets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE + CONSTRAINT `install_target_providers_ibfk_2` FOREIGN KEY (`install_target`) REFERENCES `install_targets` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `install_target_providers_ibfk_3` FOREIGN KEY (`version`) REFERENCES `versions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci install_targets CREATE TABLE `install_targets` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, @@ -919,7 +923,7 @@ versions CREATE TABLE `versions` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `order` bigint(20) DEFAULT NULL, `epoch` mediumint(9) NOT NULL, - `version` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `version` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `content` (`epoch`,`version`), KEY `order` (`order`) -- cgit v1.2.3-70-g09d2