From 2f0f54632ecb4ddc1daca3efd4582baab5b11dcb Mon Sep 17 00:00:00 2001 From: creme332 <65414576+creme332@users.noreply.github.com> Date: Thu, 18 Apr 2024 13:15:59 +0400 Subject: [PATCH] attempt to fix duplicate check constraint name error for city_length --- resources/database/dump/cafe.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/database/dump/cafe.sql b/resources/database/dump/cafe.sql index e445546..b44ab03 100644 --- a/resources/database/dump/cafe.sql +++ b/resources/database/dump/cafe.sql @@ -57,8 +57,8 @@ CREATE TABLE `client` ( KEY `client_district_district_id_fk` (`district_id`), CONSTRAINT `client_district_district_id_fk` FOREIGN KEY (`district_id`) REFERENCES `district` (`district_id`) ON UPDATE CASCADE, CONSTRAINT `client_fk` FOREIGN KEY (`user_id`) REFERENCES `user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `city_length` CHECK (char_length(`city`) > 2), - CONSTRAINT `street_length` CHECK (char_length(`street`) > 3) + CONSTRAINT `street_length` CHECK (char_length(`street`) > 3), + CONSTRAINT `client_city_length` CHECK (char_length(`city`) > 2) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -330,4 +330,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2024-04-09 11:14:04 +-- Dump completed on 2024-04-18 13:13:42