From d6d77fd3f5aa8c2af555e893cecb867405dd9e42 Mon Sep 17 00:00:00 2001 From: Reknij Date: Thu, 11 Apr 2024 22:06:13 +0800 Subject: [PATCH] fix insert unique --- server/src/public_system.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/public_system.rs b/server/src/public_system.rs index 1579632..a326822 100644 --- a/server/src/public_system.rs +++ b/server/src/public_system.rs @@ -84,7 +84,7 @@ impl PublicSystem { id INTEGER PRIMARY KEY, reserved INT NOT NULL DEFAULT 1 ); - INSERT INTO public_table (id, reserved) VALUES (1, 1)", + INSERT OR IGNORE INTO public_table (id, reserved) VALUES (1, 1)", ) .execute(&pool) .await