Replies: 30 comments 9 replies
|
Originally posted by @marcjulian in notiz-dev/prisma-dbml-generator#34 (comment)
|
|
Originally posted by @valentinpalkovic in valentinpalkovic/prisma-json-schema-generator#548 (comment)
|
|
Originally posted by @maoosi in maoosi/prisma-appsync#42 (comment)
|
|
Originally posted by @YassinEldeeb in:
|
|
Originally posted by @omar-dulaimi in omar-dulaimi/prisma-yup-generator#10 (comment)
|
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 |
|
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) |
|
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? |
|
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 |
|
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 |
|
I want to run tests that alter the database. So I need to do whatever |
|
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 |
|
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 |
|
For my purposes I require the SDK (or more specifically |
|
We've used
|
|
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);
} |
|
Using it to generate express routes and swagger docs from a |
|
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? |
|
Hello there! I'm using it to build a Next.js CRUD generator, based on the models ( |
|
Hey everyone, I am using the definitions from @prisma/generator-helper for Oxigen |
|
Hi all! I'm using this to parse my prisma schema and generate a corresponding mermaid.js diagram |
|
I am using this because of the following issue: |
|
Hey there, I'm using |
|
We are using |
|
We are using |
|
We are using We are also using |
|
We are using @prisma/internals (specifically, getDMMF) to serialize/deserialize bigint and decimals properly in queries and responses sent across AMQP (RabbitMQ) via JSON. |
|
We intend to use |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Note: We renamed our
@prisma/sdkpackage to@prisma/internalswith Prisma4.0.0(released on June 28th).The
@prisma/sdkpackage 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 withinternalsthan 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 💚
All reactions