From 6130065b5b8f2c530c1c5b9f6d16cfb1b06b2026 Mon Sep 17 00:00:00 2001 From: Jakub Onderka Date: Tue, 3 Aug 2021 10:26:25 +0200 Subject: [PATCH] chg: [internal] Organisation and object UUID should be unique --- INSTALL/MYSQL.sql | 4 ++-- db_schema.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/INSTALL/MYSQL.sql b/INSTALL/MYSQL.sql index 4370bd624..aaff43469 100644 --- a/INSTALL/MYSQL.sql +++ b/INSTALL/MYSQL.sql @@ -664,7 +664,7 @@ CREATE TABLE IF NOT EXISTS `objects` ( INDEX `template_version` (`template_version`), INDEX `meta-category` (`meta-category`), INDEX `event_id` (`event_id`), - INDEX `uuid` (`uuid`), + UNIQUE INDEX `uuid` (`uuid`), INDEX `timestamp` (`timestamp`), INDEX `distribution` (`distribution`), INDEX `sharing_group_id` (`sharing_group_id`), @@ -787,7 +787,7 @@ CREATE TABLE IF NOT EXISTS `organisations` ( `restricted_to_domain` text COLLATE utf8_bin, `landingpage` text CHARACTER SET utf8 COLLATE utf8_unicode_ci, PRIMARY KEY (`id`), - INDEX `uuid` (`uuid`), + UNIQUE INDEX `uuid` (`uuid`), INDEX `name` (`name`(255)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; diff --git a/db_schema.json b/db_schema.json index 09a90fbcd..e392d4a60 100644 --- a/db_schema.json +++ b/db_schema.json @@ -7991,7 +7991,7 @@ "template_version": false, "meta-category": false, "event_id": false, - "uuid": false, + "uuid": true, "timestamp": false, "distribution": false, "sharing_group_id": false, @@ -8026,7 +8026,7 @@ }, "organisations": { "id": true, - "uuid": false, + "uuid": true, "name": false }, "org_blocklists": {