From 555000e87412c4f3c8c0a13cb79c9b93dfe20104 Mon Sep 17 00:00:00 2001 From: git Date: Sun, 15 Jun 2025 19:12:44 +0100 Subject: [PATCH] Improve UNIQUE constraint of table, to make it easier to issue REPLACE INTO instructions --- central_db.sql.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/central_db.sql.php b/central_db.sql.php index 4807f50..f070a40 100644 --- a/central_db.sql.php +++ b/central_db.sql.php @@ -1,13 +1,14 @@ USE NETWORK; DROP TABLE IF EXISTS mDNS; CREATE TABLE mDNS ( - id INT PRIMARY KEY AUTO_INCREMENT, Host VARCHAR(255) NOT NULL, Type ENUM('A','PTR','SRV') NOT NULL, Name VARCHAR(255), - Data VARCHAR(1024) + Data VARCHAR(1024), + PRIMARY KEY (Host,Type,Name) ); + "hostname01", "password" => "password01"],