I had a project that was using the latest version of Prisma (3.9.1) and was planning to place a CMS on top of it. Keystone seemed like a very good fit as they already use Prisma internally. Unfortunately I couldn't modify the Prisma schema because it was auto-generated from the Keystone schema. Is there a way to reverse the process and get a Keystone schema from Prisma ?
Generate KeyStone.js 6 schema from modified Prisma schema
793 Views Asked by Brook MG At
2
There are 2 best solutions below
0
Coco
On
One option is to paste your Prisma schema into extendedPrismaSchema in keystone/schema.ts as following:
SomeSchema: list({
fields: {},
db: {
extendPrismaSchema() {
return `
model YourSchema {
id String
name String
email String
}
`;
}
}
})
I don't know how this would affect things, but it's one way!
Related Questions in NODE.JS
- Using Puppeteer to scrape a public API only when the data changes
- How to request administrator rights?
- How do I link two models in mongoose?
- Variable inside a Variable, not updating
- Unable to Post Form Data to MongoDB because of picturepath
- Connection terminated unexpectedly while performing multi row insert using pg-promise
- Processing multiple forms in nodejs and postgresql
- Node.js Server + Socket.IO + Android Mobile Applicatoin XHR Polling Error...?
- How to change the Font Weight of a SelectValue component in React when a SelectItem is selected?
- My unban and ban commands arent showing when i put the slash
- how to make read only file/directory in Mac writable
- How can I outsource worker processes within a for loop?
- Get remote MKV file metadata using nodejs
- Adding google-profanity-words to web page
- Products aren't displayed after fetching data from mysql db (node.js & express)
Related Questions in CONTENT-MANAGEMENT-SYSTEM
- Check REQUEST_URI for any /nl/ or /en/ to change my RewriteRules
- Website Architecture and programming language
- what is best frontend and backend tools to build management sites with the support of cross domain communication
- Joomla 5..0.3 delay in search
- Model attributes in the custom component controller of accelerator - How this is handled in the context of OCC and Spartacus?
- File manager for Ghost CMS
- Contentful UI extension to intercept unpublishing
- Multi layout column form in Optimizely CMS
- x icon disappears in Webflow
- The media files are not visible within the components when using Strapi API
- How to create a table of contents from Strapi rich text field
- I am getting issues with vtiger the open source crm, was working fine but now when i try to configure mailbox it loads foever doesnt work
- Next.js 14 Draft Mode not working in an iframe(headless CMS preview)
- Parent menu link opens children when clicked, instead of going to link (Drupal)
- Strapi CMS deployment external database supabase, managing content with Nuxt and images on Cloudinary
Related Questions in PRISMA
- GET http://localhost:3000/ 500 (Internal Server Error)
- Error: P1001: Can't reach database server at `db`:`5432` on github actions
- Nuxt3 + vercel postgressQL slow in production
- How to type nextjs endpoint with TypeScript?
- How to fix common 500 internal server error when use POST method on NEXTJS
- Why "npx prisma db pull" is blocked on Introspecting?
- How do i work with a potentially nullable field in prisma ORM and MongoDB that references the id of another model?
- Issue querying related data in Apollo Server 4 with Prisma Schema
- Using Auth0 and Prisma to capture user information
- I deployed my next project on vercel but it doesn't work(it works well in local)
- Should I use expo router v3 in prod and a question about getting prisma types
- How to findMany() with nested array of objects using Prisma?
- i keep get this error "Error: Command failed with ENOENT: ts-node prisma/seed.ts spawn ts-node" when i run npx prisma db seed
- How can I inject the prisma io module using inversify in my node.js project?
- Query Help Needed with Kysely: Type Mismatch in whereRef Method
Related Questions in KEYSTONEJS
- KeystoneJs 6 Forgot password on Signin page
- How to change KeystoneJS v6 database from default SQLite to MySQL
- Keystone.js isAdmin var mentioned in documentation not working
- How to fetch and pass the dynamic data into the custom field (Keystone.js 6)?
- In Keystone 6, can we disable the user authentication/user login?
- Keystone: How to get context type based on defined lists?
- Keystone with Supabase?
- How do I create a Keystone.js field that can take multiple images as an input and then store them?
- Error [MongoError]: Unsupported OP_QUERY command: find
- How can I use Azure Storage Account with Keystone?
- Add logged in user ID to foreign key field automatically in KeystoneJS
- Adding access controls to users in KeystoneJS
- how can I use a keystonejs v6 inside a nestjs app?
- How to model a multi-type relationship in KeystoneJS?
- How to change the height and width of document editor in KeystoneJs 6?
Related Questions in KEYSTONEJS6
- KeystoneJs 6 Forgot password on Signin page
- Keystone.js isAdmin var mentioned in documentation not working
- How to fetch and pass the dynamic data into the custom field (Keystone.js 6)?
- In Keystone 6, can we disable the user authentication/user login?
- How can I override Webpack config in a dependency package?
- How do I create a Keystone.js field that can take multiple images as an input and then store them?
- Add logged in user ID to foreign key field automatically in KeystoneJS
- how can I use a keystonejs v6 inside a nestjs app?
- How to change the height and width of document editor in KeystoneJs 6?
- Add data automatically to a table B when you add data to table A
- keystonejs form a multi-column unique constraint
- Keystone 6 js: checkbox null values
- An error occurred handling a request for the Admin UI: Error: Prisma error: The table `main.User` does not exist in the current database
- Did anyone tried to add React UI to KeystoneJS v6 for custom page?
- Keystone 6, redirect after save
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
At the moment there's no way to generate a Keystone schema from an existing Prisma schema. You'd need to create the Keystone schema manually so Keystone could generate a new Prisma schema file.
There's also currently no way to modify the Prisma schema generated by Keystone, though there's been talk of opening this up.