`document` filed not support rich text using `text` type in database?
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- typescript
Research direction
Start by comparing the Article.body definitions in prisma.schema, generated prisma.ts, and schema.ts. Trace how document() is mapped to the database and determine what behavior is expected for rich text stored in a text column. A complete result should clarify whether this mapping is supported and identify the relevant test or schema-generation change.
Written by the indexing model from the issue text.
Description
I am using text type store rich text in db,This is the exist prisma.schema in another project(Article.body is the column to store rich text)
model Category {
id Int @id @default(autoincrement())
title String
articles Article[]
}
model Article {
id Int @id @default(autoincrement())
category Category @relation(fields: [categoryId], references: [id])
categoryId Int
createdAt DateTime @default(now())
updatedAt DateTime @default(now())
isDeleted Boolean @default(false)
orgLink String @default("")
thumbnail String
title String
body String @db.Text
overview String @default("")
}
And this is generate by prisma.ts in keystone
model Category {
id Int @id @default(autoincrement())
title String @default("")
articles Article[] @relation("Article_category")
}
model Article {
id Int @id @default(autoincrement())
category Category? @relation("Article_category", fields: [categoryId], references: [id])
categoryId Int? @map("category")
createdAt DateTime? @default(now())
updatedAt DateTime? @default(now())
isDeleted Boolean @default(false)
orgLink String @default("")
thumbnail String @default("")
title String @default("")
body Json @default("[{\"type\":\"paragraph\",\"children\":[{\"text\":\"\"}]}]")
overview String @default("")
@@index([categoryId])
}
and the schema.ts
export const lists: Lists = {
Category: list({
access: allowAll,
fields: {
title: text(),
articles: relationship({
ref: "Article.category",
many: true,
}),
},
}),
Article: list({
access: allowAll,
fields: {
category: relationship({
ref: "Category.articles",
many: false,
}),
createdAt: timestamp({
defaultValue: { kind: "now" },
}),
updatedAt: timestamp({
defaultValue: { kind: "now" },
}),
isDeleted: checkbox({ defaultValue: false }),
orgLink: text({ defaultValue: "" }),
thumbnail: text(),
title: text(),
body: document(),
overview: text(),
},
}),
Admin: list({
access: allowAll,
fields: {
name: text({ validation: { isRequired: true } }),
email: text({
validation: { isRequired: true },
isIndexed: "unique",
}),
password: password({ validation: { isRequired: true } }),
createdAt: timestamp({
defaultValue: { kind: "now" },
}),
},
}),
};
- Dominant language
- TypeScript
- Stars
- 10k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 38
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from keystonejs/keystone
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
keystonejs/keystone#10143 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
keystonejs/keystone#10141 ·
Maintainers usually reply within 1 day
-
[bug] List view search field becomes disabled when search returns no results, interrupting IME inputPossibly taken @ltxhhz claimed this 17 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
keystonejs/keystone#10097 ·
Maintainers usually reply within 1 day
-
Document Fields Demo page of docs refers to form that doesn't existMay be free again @Mthize claimed this 189 days ago, and no pull request is open. Open
Difficulty 1/5 Under an hour Newbie friendliness 72/100
keystonejs/keystone#9766 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 75/100
keystonejs/keystone#10142 ·
Maintainers usually reply within 1 day
All issues in keystonejs/keystone
Similar issues
-
🔨 tool 🧰 library
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Orange-OpenSource/Orange-Boosted-Bootstrap#4035 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
DISIC/teleservice-conformite#230 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
rothgar/rabble.radio#410 ·
Maintainers usually reply within 1 day
-
Docker > Volumes: sorting by Size does nothing, and text columns sort inconsistentlyPossibly taken @BitPluto claimed this today. Openneeds-triage🔍
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Dokploy/dokploy#6203 · 1 comment ·
Maintainers usually reply within 1 day
-
area/webapp comp/desktop P2 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#163341 · 2 comments ·
Maintainers usually reply within 1 day