Makes team names and slug required

This commit is contained in:
zomars 2022-10-10 18:28:24 -06:00
parent 9453c1fc3a
commit e2362d8f2a
2 changed files with 15 additions and 3 deletions

View File

@ -0,0 +1,10 @@
/*
Warnings:
- Made the column `name` on table `Team` required. This step will fail if there are existing NULL values in that column.
- Made the column `slug` on table `Team` required. This step will fail if there are existing NULL values in that column.
*/
-- AlterTable
ALTER TABLE "Team" ALTER COLUMN "name" SET NOT NULL,
ALTER COLUMN "slug" SET NOT NULL;

View File

@ -31,7 +31,7 @@ enum PeriodType {
model EventType {
id Int @id @default(autoincrement())
/// @zod.nonempty()
/// @zod.min(1)
title String
/// @zod.custom(imports.eventTypeSlug)
slug String
@ -192,8 +192,10 @@ model User {
model Team {
id Int @id @default(autoincrement())
name String?
slug String? @unique
/// @zod.min(1)
name String
/// @zod.min(1)
slug String @unique
logo String?
bio String?
hideBranding Boolean @default(false)