From 3cbe70e900a9d070491149f2615d5a4a5b51d4c6 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Mon, 22 Jan 2024 17:15:52 +0100 Subject: [PATCH] Add primary keys to database tables (#1425) As suggested in #1380, this PR adds Primary keys to the `telescope_entries_tags` and the `telescope_monitoring` tables, to allow HA MySQL deployments. Co-authored-by: Zois Pagoulatos --- .../2018_08_08_100000_create_telescope_entries_table.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/database/migrations/2018_08_08_100000_create_telescope_entries_table.php b/database/migrations/2018_08_08_100000_create_telescope_entries_table.php index 93bf5f90d..96b89699b 100644 --- a/database/migrations/2018_08_08_100000_create_telescope_entries_table.php +++ b/database/migrations/2018_08_08_100000_create_telescope_entries_table.php @@ -42,7 +42,7 @@ public function up(): void $table->uuid('entry_uuid'); $table->string('tag'); - $table->index(['entry_uuid', 'tag']); + $table->primary(['entry_uuid', 'tag']); $table->index('tag'); $table->foreign('entry_uuid') @@ -52,7 +52,7 @@ public function up(): void }); $schema->create('telescope_monitoring', function (Blueprint $table) { - $table->string('tag'); + $table->string('tag')->primary(); }); }