https://www.prisma.io/ logo
Join SlackCommunities
Powered by
# orm-help
  • a

    Anna Sudol

    04/22/2020, 8:12 PM
    Hello, When I trying to install Prisma globally (npm install -g prisma) on mac (10.14.6 ) have got the following warring:  "request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 /Users/admin/bin/prisma -> /Users/admin/lib/node_modules/prisma/dist/index.js + prisma@1.34.10 updated 1 package in 24.338s” then when I’m trying to do prism init, I see a message that the command not found: prisma I was trying with sudo and yarn -didnt help.
    r
    • 2
    • 1
  • l

    Lars-Jørgen Kristiansen

    04/22/2020, 8:21 PM
    Is it possible to use another db name than "prisma" with prisma 1? I would like to use the same managed database for 2 apps..
    r
    • 2
    • 9
  • j

    jt

    04/22/2020, 11:28 PM
    anyone experienced with self-hosting prisma and graphql yoga servers on linux?
    r
    • 2
    • 5
  • l

    Louis Gelinas

    04/23/2020, 2:08 AM
    Getting a weird thing where Prisma 2.0 PrismaClient is returning objects for a 1:many relationship query rather than the data. I introspected a mySQL database to generate my schema than annotated it.
    r
    • 2
    • 9
  • l

    Leo Hui

    04/23/2020, 2:24 AM
    does anyone know who prisma website implement the code example animation?
    v
    n
    +2
    • 5
    • 8
  • g

    go4cas

    04/23/2020, 7:59 AM
    Hey guys ... apologies if this question has been asked here before (but, couldn't find answers when googling) ... I'm looking for a way to auto-convert snake_case to camelCase when introspecting my DB. The docs mention the
    @map
    directive, but it seems that one will have to do it manually for every field in every table. Also, when schema changes are applied on the database,
    prisma introspect
    will override the hand coded changes in
    prisma.schema
    . Any advice?
    r
    • 2
    • 2
  • k

    ksch

    04/23/2020, 8:46 AM
    How to define a second where criteria with Prisma 2 to be able to query with?
    Copy code
    where: {
          myCustomId: String(id)
        }
    Basically I want to query with the default ID but also with another one
    r
    • 2
    • 9
  • t

    Tony Shannon

    04/23/2020, 7:04 PM
    Newbie/Novice/Basic Question please: In setting up a new project via app.prisma.io wrt Types v Models/ id autoincrement In using the CLI for hosted service at prisma.io to get started It offers the following starter Type type User { id: ID! @id name: String! } I would like to amend the id to an autoincrement Integer, such as this tutorial material suggests here https://www.prisma.io/docs/getting-started/quickstart-typescript#write-your-first-query-with-prisma-client model User { id Int @id @default(autoincrement()) email String @unique name String? posts Post[] } but then I notice the difference between type and model The datamodel.prisma files that is set up as a starter seems to be based on types (not models) and works very well for quick setup The app.prisma.io service I am using is hooked into the hosted SQL service and abstracted away, so all changes are made via datamodel.prisma So how to use the app.prisma.io hosted service to edit models versus types? How to use an autoincrement Int field as id there? Many thanks for directing me to where this is best explained Thanks in advance Tony
    s
    n
    • 3
    • 14
  • c

    Connor Barrett

    04/23/2020, 10:02 PM
    Prisma 2.0 generator question: has anyone had issues with the generator in Prisma 2.0? ex: generator client { provider = "prisma-client-js" output = "../src/generated/client" }
  • c

    Connor Barrett

    04/23/2020, 10:03 PM
    I'm still getting: Generated Prisma Client to .\node_modules\@prisma\client
  • c

    Connor Barrett

    04/23/2020, 10:03 PM
    thanks in advance👍
  • c

    Connor Barrett

    04/23/2020, 10:23 PM
    figured this out! I needed to add to my prisma schema rather prisma.yml
    👍 1
  • c

    chestrbrian

    04/24/2020, 12:36 AM
    Hi all, what do put in as
    Address
    under Jenkins for the prisma cloud plugin. We're using Prisma SaaS. Thank you.
    r
    • 2
    • 1
  • t

    Tristan

    04/24/2020, 10:07 AM
    Has the Prisma2 example for Graphql been removed or am I completely missing it in the examples?
    r
    • 2
    • 4
  • f

    flybayer

    04/24/2020, 12:09 PM
    Fullstack framework built on Next.js and with Prisma 2 as the default DB client! https://twitter.com/flybayer/status/1253649008540569600?s=20
    prisma rainbow 8
    👀 2
    🤯 2
    💯 5
    🎉 5
    prisma cool 3
    fast parrot 5
    🚀 5
    💪 2
    👏 4
    l
    • 2
    • 5
  • j

    Joseph

    04/24/2020, 5:05 PM
    How could i do something like:
    Copy code
    type User {
      ...
      matches: [Match!]!
    }
    
    type Match {
      ...
      host: User!
      client: User!
      disconnector: User
    }
    Can't figure out how to do relations in this many to many where the User could be 1+ of several fields I've tried using 1 relation for all of them, but got the expected error
    n
    • 2
    • 4
  • c

    Charles Gaudreau Jackson

    04/24/2020, 11:35 PM
    Hi, I'm struggling with this error. I don't understand where I should be looking to fix it. I haven't had an error like this one before:
    r
    j
    • 3
    • 2
  • e

    Ehsan Sarshar

    04/25/2020, 7:18 AM
    Do prisma delete only delete the prisma service or it also delete the database ? prisma@1
    r
    • 2
    • 2
  • h

    Hanyati

    04/25/2020, 1:15 PM
    guys have this issues
    r
    j
    • 3
    • 5
  • h

    Hanyati

    04/25/2020, 1:16 PM
    prisma returns an empty object whenever i execute a findone and findmany what could be the issues
  • n

    Nicolò

    04/25/2020, 6:30 PM
    Hi guys, I'm facing an issue. I have an old Prisma 1.30 model. Now we would like to migrate the to the latest 1.x prisma version. The new model for 1.34 wants the relation type (INLINE or TABLE). We have created the new model but the data get lost. So we created a new BK database and we have migrated the data using plain SQL to the new ideal "model" structure, we than used
    prisma introspect
    to generate the model from the db schema and its mostly the same of the one we have created wen we initially have tried to migrate to 1.34. But Prisma is still lookin for the old tables that are no more present. Our main change was to move all the n:m relations that actually were 1:n to inline. (we were also facing bad performaces) Unfortunatly we have production data in it. What can we do? (Other than to move to Prisma2 that cant be done right now for other issues?) We have a postgres DB.
  • d

    Dulara Malindu Colombage

    04/26/2020, 3:53 PM
    Hi, Can someone know how prisma stores enum types that we create in the datamodel in postgres db? what is the table name for that enum field?
  • d

    Dulara Malindu Colombage

    04/26/2020, 3:54 PM
    I have a type named Order. and there is a field named status which is an enum., I checked the postgres database, the status field is not there. Does prisma store that somewhere else?
    s
    • 2
    • 4
  • s

    Sijad

    04/26/2020, 5:28 PM
    Hi! is it possible to define CRUD hooks for prisma2 models? I'm looking for a way to implement something like [ent privacy](https://github.com/facebookincubator/ent/blob/cdd855c8c9ec295eb1a9721b97eb4bb014cdcb55/entc/integration/privacy/ent/schema/planet.go#L43-L55)
    l
    • 2
    • 2
  • t

    Taylor

    04/26/2020, 8:11 PM
    Does anyone how how one would access files (such as csv) stored on backend filesystem
  • t

    Taylor

    04/26/2020, 8:11 PM
    ?
  • t

    Taylor

    04/26/2020, 8:12 PM
    I have a GraphQL/Prisma backend directory and React frontend directory, separate, but not entirely sure how to fetch files on the frontend from the backend
  • j

    jonthewayne

    04/26/2020, 11:51 PM
    Just tried out the quick demo and then tried the experimental notes on using prisma migrate. Ran
    npx prisma migrate save --name "add-profile" --experimental
    and got this:
    migrate save is not a prisma command.
    Is prisma migrate no longer working?
    r
    • 2
    • 3
  • j

    Joseph

    04/27/2020, 4:52 AM
    Is there a way to query for rows where a field is null? Like
    Copy code
    prisma.query.matches({ where: { endedAt: null } }, info)
    This doesn't work for me
    c
    • 2
    • 2
  • u

    urbanendeavour

    04/27/2020, 12:00 PM
    When I follow the tutorial to setup a database, it says run
    Copy code
    npx prisma init
    to setup the folders, yet I am prompted with a helper menu.
    r
    • 2
    • 11
1...367368369...637Latest