P
Prisma8mo ago
simnJS

Error

// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init

generator client {
provider = "prisma-client-js"
}

datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}

model Bot {
id String @id @default(cuid())
commandExecutedCount Int @default(0)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}

model Guild {
id String @id
name String
users User[]
}

model User {
id String @id
anniversaire Anniversary[]
guildId String @db.VarChar(191)
guild Guild @relation(fields: [guildId], references: [id])

@@unique([id, guildId])
}

model Anniversary {
id Int @id @default(autoincrement())
date DateTime
userId String @unique @db.VarChar(191)
user User @relation(fields: [userId], references: [id])
}
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init

generator client {
provider = "prisma-client-js"
}

datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}

model Bot {
id String @id @default(cuid())
commandExecutedCount Int @default(0)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}

model Guild {
id String @id
name String
users User[]
}

model User {
id String @id
anniversaire Anniversary[]
guildId String @db.VarChar(191)
guild Guild @relation(fields: [guildId], references: [id])

@@unique([id, guildId])
}

model Anniversary {
id Int @id @default(autoincrement())
date DateTime
userId String @unique @db.VarChar(191)
user User @relation(fields: [userId], references: [id])
}
I got this error : Error: La clé est trop longue. Longueur maximale: 1000 0: sql_schema_connector::apply_migration::migration_step with step=CreateIndex { table_id: (Some(TableId(3)), TableId(2)), index_id: IndexId(3), from_drop_and_recreate: false } at schema-engine\connectors\sql-schema-connector\src\apply_migration.rs:21 1: sql_schema_connector::apply_migration::apply_migration at schema-engine\connectors\sql-schema-connector\src\apply_migration.rs:10 2: schema_core::state::SchemaPush at schema-engine\core\src\state.rs:434
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server