Replies: 23 comments 7 replies
-
Originally posted by @marcjulian in notiz-dev/prisma-dbml-generator#34 (comment)
|
Beta Was this translation helpful? Give feedback.
-
Originally posted by @valentinpalkovic in valentinpalkovic/prisma-json-schema-generator#548 (comment)
|
Beta Was this translation helpful? Give feedback.
-
Originally posted by @maoosi in maoosi/prisma-appsync#42 (comment)
|
Beta Was this translation helpful? Give feedback.
-
Originally posted by @YassinEldeeb in:
|
Beta Was this translation helpful? Give feedback.
-
Originally posted by @omar-dulaimi in omar-dulaimi/prisma-yup-generator#10 (comment)
|
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
I use Another question I have is regarding logging. There's a disclaimer that links to this issue in |
Beta Was this translation helpful? Give feedback.
-
We use get-platform to build the engine-filenames. This is needed when we want to run prisma and the migrations when our Electorn app starts: see #9613 (comment) |
Beta Was this translation helpful? Give feedback.
-
I would like to use Prisma for a SQLite database in my Electron app, so I would love an API for manually running pending migrations when the app starts. Is something like this possible today? |
Beta Was this translation helpful? Give feedback.
-
Ive been using @prisma/sdk as a indirect dependency of @prisma/migrate as I need access to the migration engine, which I'd prefer not to execute |
Beta Was this translation helpful? Give feedback.
-
We have a database that was created long before anyone in my team knew about prisma. So all constraints and indexes (among other things) are "improperly" named. If we were to start over we would name them according to prisma naming scheme. So we would like to be able to parse the |
Beta Was this translation helpful? Give feedback.
-
I want to run tests that alter the database. So I need to do whatever |
Beta Was this translation helpful? Give feedback.
-
I recently created a generator which outputs my enums to a separate entry point that I could use on the client. I used your generator helper for this which made it really easy, it was a great experience. Would love for it to be documented |
Beta Was this translation helpful? Give feedback.
-
In our case, Amplication, we are using it for another package that we maintain: Recently, we had a problem with the CI workflow. It all started when we made 2 changes that, at first, seemed to be unrelated to each other, but now we know that these two changes are indeed related.
We read that Prisma supports
Following the stack trace, and the fact that After this change, (and some other changes on |
Beta Was this translation helpful? Give feedback.
-
For my purposes I require the SDK (or more specifically |
Beta Was this translation helpful? Give feedback.
-
We've used
|
Beta Was this translation helpful? Give feedback.
-
I'm actually using @prisma/internals to generate prisma schema in a pragmatical way using projen:
e.g. export enum PrismaObjectTypeDefinition {
MODEL = "model",
ENUM = "enum",
}
export type EnumDefinition = {
type: PrismaObjectTypeDefinition.ENUM;
name: string;
values: string[];
};
export type ModelFieldDefinition = {
name: string;
type: string;
modifier?: string;
};
export type ModelDefinition = {
type: PrismaObjectTypeDefinition.MODEL;
name: string;
fields: ModelFieldDefinition[];
modifiers?: string[];
};
export type PrismaObjectDefinition = EnumDefinition | ModelDefinition;
export type PrismaSchemaDefinition = PrismaObjectDefinition[];
function formatEnum(obj: EnumDefinition) {
return `enum ${obj.name}{
${obj.values.join(" \n")}
}`;
}
function formatModel(obj: ModelDefinition) {
return `model ${obj.name}{
${obj.fields
.map((f) => `${f.name} ${f.type} ${f.modifier ?? ""}`)
.join(" \n")}
${obj.modifiers?.join("\n") ?? ""}
}`;
}
function formatObject(obj: PrismaObjectDefinition) {
switch (obj.type) {
case PrismaObjectTypeDefinition.ENUM:
return formatEnum(obj);
case PrismaObjectTypeDefinition.MODEL:
return formatModel(obj);
}
}
function generate(definition: PrismaSchemaDefinition){
const schemaContent = `datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
output = "client"
binaryTargets = ["native", "rhel-openssl-1.0.x", "linux-musl"]
}
${
definition
? definition
.map((obj) => formatObject(obj))
.join("\n")
: ""
}
`;
return formatSchema(schemaContent);
} |
Beta Was this translation helpful? Give feedback.
-
Using it to generate express routes and swagger docs from a |
Beta Was this translation helpful? Give feedback.
-
I came here looking to extend "Prisma Kysely", which uses the @prisma/generator-helper. For some reason the generatorHandler doesn't parse in unsupported columns. I was trying to use prisma for database schema management with an unsupported type of "Geometry" in sql server, and then using kysely to insert/read the values correctly in the format a driver would understand. I wished to override the type in "Prisma Kyseley" and map it to a string, i.e the format the underlying driver would understand. Is there a reason the generatorHandler is filtering out Unsupported columns? |
Beta Was this translation helpful? Give feedback.
-
Hello there! I'm using it to build a Next.js CRUD generator, based on the models ( |
Beta Was this translation helpful? Give feedback.
-
Hey everyone, I am using the definitions from @prisma/generator-helper for Oxigen |
Beta Was this translation helpful? Give feedback.
-
Hi all! I'm using this to parse my prisma schema and generate a corresponding mermaid.js diagram |
Beta Was this translation helpful? Give feedback.
-
Note: We renamed our
@prisma/sdk
package to@prisma/internals
with Prisma4.0.0
(released on June 28th).The
@prisma/sdk
package was meant as a Prisma internal package only, but it leaked out over time and is now used across many community tools and packages.With the rename of the npm package we want to make it clearer that we can not give any API guarantees for
@prisma/internals
, might need to introduce breaking changes to the API from time to time and will not follow semantic versioning (breaking changes only in major upgrade) with it. We think that it is better communicated withinternals
than withsdk
.Here you could help us gain an understanding where, how and why you are using
@prisma/sdk
(now@prisma/internals
) to achieve, what exactly.Your feedback will be valuable to us in defining a better API.
Looking forward to your feedback,
Your friends at Prisma 💚
Beta Was this translation helpful? Give feedback.
All reactions