Update the prisma/prisma.schema file. Do not remove any existing tables but feel free to modify them if needed. Use camelCase for all variables but you MUST use @map to map them to snake_cased table columns. Do not duplicate any tables. The full path is prisma/schema.prisma. Here are the details of the new schema that needs to be merged with the existing schema:
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
Update the prisma/prisma.schema file. Do not remove any existing tables but feel free to modify them if needed. Use camelCase for all variables but you MUST use @map to map them to snake_cased table columns. Do not duplicate any tables. The full path is prisma/schema.prisma. Here are the details of the new schema that needs to be merged with the existing schema:
datasource db { provider = "postgresql" url = env("DATABASE_URL") }
generator client { provider = "prisma-client-js" }
model User { id String @id @default(cuid()) @map("id") githubId Int @unique @map("github_id") name String @map("name") email String @unique @map("email") image String? @map("image") createdAt DateTime @default(now()) @map("created_at") updatedAt DateTime @default(now()) @map("updated_at") projects Project[] slackAuth SlackAuth[] }
model Project { id String @id @default(cuid()) @map("id") name String @map("name") description String? @map("description") userId String @map("user_id") createdAt DateTime @default(now()) @map("created_at") updatedAt DateTime @default(now()) @map("updated_at") user User @relation(fields: [userId], references: [id]) projectSettings ProjectSetting[] sitemapItems SitemapItem[] dataSchemaItems DataSchemaItem[] tasks Task[] }
model ProjectSetting { id String @id @default(cuid()) @map("id") language String @map("language") framework String @map("framework") cssStyling String @map("css_styling") database String @map("database") hosting String @map("hosting") authentication String @map("authentication") projectId String @map("project_id") createdAt DateTime @default(now()) @map("created_at") updatedAt DateTime @default(now()) @map("updated_at") project Project @relation(fields: [projectId], references: [id]) }
model SitemapItem { id String @id @default(cuid()) @map("id") fileName String @map("file_name") fileDescription String? @map("file_description") figmaLink String? @map("figma_link") approved Boolean @default(false) @map("approved") projectId String @map("project_id") createdAt DateTime @default(now()) @map("created_at") updatedAt DateTime @default(now()) @map("updated_at") project Project @relation(fields: [projectId], references: [id]) }
model DataSchemaItem { id String @id @default(cuid()) @map("id") tableName String @map("table_name") columnName String @map("column_name") columnDescription String? @map("column_description") approved Boolean @default(false) @map("approved") projectId String @map("project_id") createdAt DateTime @default(now()) @map("created_at") updatedAt DateTime @default(now()) @map("updated_at") project Project @relation(fields: [projectId], references: [id]) }
model Task { id String @id @default(cuid()) @map("id") title String @map("title") description String? @map("description") githubIssueId Int? @map("github_issue_id") approved Boolean @default(false) @map("approved") projectId String @map("project_id") createdAt DateTime @default(now()) @map("created_at") updatedAt DateTime @default(now()) @map("updated_at") project Project @relation(fields: [projectId], references: [id]) }
model SlackAuth { id String @id @default(cuid()) @map("id") accessToken String @map("access_token") userId String @map("user_id") createdAt DateTime @default(now()) @map("created_at") updatedAt DateTime @default(now()) @map("updated_at") user User @relation(fields: [userId], references: [id]) }