Improve UNIQUE constraint of table, to make it easier to issue REPLACE INTO instructions

This commit is contained in:
git 2025-06-15 19:12:44 +01:00
parent c9d0247206
commit 555000e874

View File

@ -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)
);
<?php
$hosts = [
["hostname" => "hostname01", "password" => "password01"],