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

    manuel

    02/24/2021, 9:56 AM
    https://hasura.io/docs/latest/graphql/core/event-triggers/index.html How would you solve such a use case with prisma?
  • m

    manuel

    02/24/2021, 9:56 AM
    The use case is if the user updates his reminder settings, all the reminders must be updated.
    r
    • 2
    • 2
  • r

    Ron Mizrahi

    02/24/2021, 10:03 AM
    Hey my company moved from TypeORM to prisma
  • r

    Ron Mizrahi

    02/24/2021, 10:03 AM
    using the same env variables and server, we have this issue:
  • r

    Ron Mizrahi

    02/24/2021, 10:03 AM
    Copy code
    > pii-api@1.0.0 start:nobuild /app
    > npm run prisma:migration && npm run prisma:seed && node ./dist/main
    > pii-api@1.0.0 prisma:migration /app
    > npm run prisma:cli -- migrate deploy --preview-feature
    > pii-api@1.0.0 prisma:cli /app
    > node ./node_modules/.bin/prisma "migrate" "deploy" "--preview-feature"
    Environment variables loaded from .env
    Environment variables loaded from prisma/.env
    Prisma schema loaded from schema.prisma
    Datasource "db": PostgreSQL database "oct_dev", schema "pii" at "<http://pgpool.pg:5432|pgpool.pg:5432>"
    1 migration found in prisma/migrations
    Error: P1002
    The database server at `<http://pgpool.pg|pgpool.pg>`:`5432` was reached but timed out.
    Please try again.
    Please make sure your database server is running at `<http://pgpool.pg|pgpool.pg>`:`5432`.
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    r
    j
    +2
    • 5
    • 146
  • r

    Ron Mizrahi

    02/24/2021, 10:04 AM
    does someone why It can happen? error p1002
  • r

    Ralf Vogler

    02/24/2021, 12:50 PM
    What's the best way to fetch a tree?
    include
    only populates immediate children. Is there a recursive include or do I have to build the tree myself? What if I want to order/filter/limit the roots? I want to avoid having to do multiple queries.
    r
    • 2
    • 2
  • m

    maxweld

    02/24/2021, 1:09 PM
    Hi. What is the advice or consensus regarding source code management of the Prisma Migration files? Should I include them or exclude them in my Git configuration?
    k
    r
    a
    • 4
    • 5
  • r

    Ralf Vogler

    02/24/2021, 2:38 PM
    Are there any workarounds for the lack of unions? I want to show a feed of several models ordered by time. Currently I query each one and merge sort them on the client which seems like a terrible hack. See https://github.com/prisma/prisma/issues/2505
    • 1
    • 1
  • m

    manuel

    02/24/2021, 2:44 PM
    Hey! Are there any plans on saving seeds that are already in the database? Eg people update the seeds with studio and I want to update my older local seed data?!?
    a
    • 2
    • 2
  • y

    YeonHoPark

    02/24/2021, 3:25 PM
    How can I change mysql column name using migration without data loss ?  The above case is possible when the default is null and when there is no data https://www.prisma.io/docs/concepts/components/prisma-migrate/prisma-migrate-flows The below DDL can be changed without any data loss and that’s what I want. “alter table user change name name2 varchar(191)” The attempts I have tested are as follows. But it failed. 1. Directly modify DB with DDL 2. Modify schema.prisma 3. prisma migrate dev --preview-feature Is it possible to change the column name without default null without losing data by migration?
    a
    t
    • 3
    • 3
  • j

    Justin Ellingwood

    02/24/2021, 5:01 PM
    Hey friends 👋 We just wanted to give you a heads up that the MySQL content we've been working on for Prisma's Data Guide has been published. Please let us know if you have any feedback! https://www.prisma.io/dataguide/#mysql
    🔥 5
    🐬 3
    🦜 3
    🌟 3
    e
    k
    • 3
    • 2
  • e

    Eddy Nguyen

    02/24/2021, 8:59 PM
    Hello everyone 👋 I published an article on how to deploy Prisma in an AWS Lambda, with Lambda layers using Serverless. There’s also a repo with working CI/CD for your convenience 😉 https://dev.to/eddeee888/how-to-deploy-prisma-in-aws-lambda-with-serverless-1m76
    🎉 6
    fast parrot 4
    ❤️ 5
    ✅ 8
    prisma rainbow 4
    t
    a
    • 3
    • 2
  • a

    Abdulrahman Alzahrani

    02/24/2021, 9:38 PM
    Hi Everyone I have a question about schema.prisma file that been generated. I do not want to store env("DATABASE_URL") connection user name and password in repository for safety but instead I bring them from AWS System store parameter. more safe. is there a way I can transform the schema.prisma into a function so I can make a call to grab all of these secret values to make a connection ?
  • t

    thdxr

    02/24/2021, 9:42 PM
    You shouldn't have to do anything special, you can pass in the params as an environment variable and prisma should pick it up
  • t

    thdxr

    02/24/2021, 9:42 PM
    when you do this
    Copy code
    datasource db {
      url      = env("DATABASE_URL")
      provider = "postgresql"
    }
  • t

    thdxr

    02/24/2021, 9:43 PM
    this means at runtime tell prisma to look for a DATABASE_URL environment variable
  • t

    thdxr

    02/24/2021, 9:43 PM
    you can also override it in your code like this
    Copy code
    export const prisma = new PrismaClient({
      datasources: {
        db: {
          url: get_url()
        },
      },
    })
    ❤️ 3
  • a

    Abdulrahman Alzahrani

    02/25/2021, 12:31 AM
    @thdxr is something like this would be valid
    Copy code
    const prisma = new PrismaClient({
      datasources: {
        db: {
          url: await get_url(),
        },
      },
    })
  • t

    tabagan

    02/25/2021, 9:46 AM
    hi there! I am newbie in prisma. should I memoize client object in controllers or I can build new client object in each controller?
    ✅ 2
    s
    • 2
    • 2
  • j

    Julien Blatecky

    02/25/2021, 11:39 AM
    Hello ! I'm a user of Prisma 2 for almost 1 year and I'm here to give some feedback and get some help 😄
    n
    j
    a
    • 4
    • 6
  • l

    Leonard

    02/25/2021, 6:55 PM
    👋
    👋 6
    🙌 1
  • a

    Aaron Fulkerson

    02/26/2021, 1:35 AM
    Are there any plans to introduce an option to get the count of all items for a query in addition to a slice of those items for pagination? Right now you have to use .count() separately.
    💯 1
    r
    • 2
    • 1
  • a

    Abdulrahman Alzahrani

    02/26/2021, 6:50 AM
    Hi everyone - can I have multiple data sources in the same time with diffrent urls? like communicating to db of type mysql and another url with nosql db?
    r
    • 2
    • 3
  • k

    Kenneth Faria

    02/26/2021, 8:16 PM
    Hey guys, working on some seeding scripts, wondering if theres anyway to return a query in seeding scripts: example:
  • k

    Kenneth Faria

    02/26/2021, 8:16 PM
    being able to return the id of the user with the email
    m
    r
    • 3
    • 6
  • s

    Sourav Kumar Nanda

    02/26/2021, 9:05 PM
    Hey, everyone! 👋 Fortunate to be present here in this awesome community. I want to introduce you all to the 3rd edition of* UtkalHacks,* a 15 days long hackathon where teams gather together to build & launch their side projects. Applications are open to designers, developers, students, and professionals alike! UtkalHacks truly promotes open innovation and teams are free to work on whatever they want. However, we also actively help everyone to discover useful problems to work on. And we also want to expose everyone to some emerging domains through our awesome talk sessions at UtkalHacks Summit. While we believe true hackers build out of passion but we anyway got some perks that might help you push your limits and get that side project built! 🙂 • Winners: Prizes worth ₹30,000 + Special Prizes • Runners up: Prizes worth ₹20,000 + Special Prizes • Prizes for Best Girls Team,* *Best Design Team, and Best Beginners Team We are also focusing on long-term & useful prizes that will help passionate hackers continue building even after the hackathon! 🎉 • Lifetime* *Subscriptions of Threejs Journey • 1 year Subscriptions of Egghead • Access to FigmaAcademy • Access to Smashing Magazine Ebooks and Membership • Pro account of Spline • More to be announced soon... Applications are closing soon! The last day for the registration is 3rd March. Let's not linger and submit your applications at 👉 https://utkalhacks.tech/ P.S. Join in on the conversation on our Discord and tune in to all the announcements on our Twitter.
  • n

    Nditah Samweld

    02/27/2021, 11:00 AM
    Hello Team, I am unable to access v2 at https://prisma.io/docs Is the website down?
    r
    • 2
    • 1
  • j

    John Smeeth

    03/01/2021, 1:53 AM
    hi all, I’m have a question does not related direct with Prisma, but related to my system. Anybody please advise me. I want to build a webpage using nextjs, and api using node + prisma. My estimate system will have capacity to serve for 10k concurrent user (CCU). How to determine how many resource to use? for example. I’m using Google cloud, how many CPU, RAM necessary. Many thanks.
    e
    j
    • 3
    • 4
  • c

    Charles Dimino

    03/01/2021, 2:49 AM
    hey, trying to run prisma in a docker container on an m1 and getting “Error: Unknown binaryTarget linux-arm-openssl-undefined and no custom binaries were provided” — I feel like I don’t understand the open issue, because it seems like there’s probably a way to get this working somehow, just with custom binaries… does anyone have any recommended reading that’ll point me in the right direction for this?
    r
    b
    t
    • 4
    • 9
1...419420421...637Latest