fix: 清理重复服务并增加唯一约束
This commit is contained in:
1 parent
5ab8c34a78
commit
a90a47f808
2 files changed
+3
No files matched your search
@@ -0,0 +1,2 @@
|
||||
-- Prevent duplicate service names within one brand.
|
||||
CREATE UNIQUE INDEX "Service_brandId_name_key" ON "Service"("brandId", "name");
|
||||
@@ -67,6 +67,7 @@ model Service {
|
||||
updatedAt DateTime @updatedAt
|
||||
bookings Booking[]
|
||||
bookingItems BookingItem[]
|
||||
@@unique([brandId, name])
|
||||
@@index([brandId, isEnabled, sortOrder])
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user