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

    ibash

    04/03/2021, 7:04 AM
    Hi prisma team! Have you written anything about your product process?
    • 1
    • 2
  • z

    zebapy

    04/03/2021, 5:32 PM
    I’m migrating data to prisma2/postgres. How can i force a model to create an ID on existing content? (i have my old mongoids already as a different column but i want to start using prisma uuids)
    r
    a
    • 3
    • 3
  • j

    Jacob Mathew

    04/03/2021, 5:50 PM
    This might be more of a SQL concern rather than Prisma, but is there an idiomatic way to model discriminated unions (https://www.typescriptlang.org/docs/handbook/2/narrowing.html#discriminated-unions) in Prisma? I'm porting an application that makes heavy use of discriminated unions and this is the main challenge. We were using a noSQL document store before, so this was not an issue there. Do you have any advice?
  • j

    Jacob Mathew

    04/03/2021, 7:50 PM
    While I'm here, I wanted to add: I would love to have support for composite types. I model my data with lots of sub-objects (very hierarchically) I would love to be able to do that and not have Prisma break it out in to a separate table with a 1-1 relationship. It would be nice to have some control over that.
    r
    • 2
    • 1
  • s

    Samson Ssali

    04/04/2021, 2:40 AM
    Copy code
    error: sorry, too many clients already
    can i expect this in production or its a dev only bug? i know it's as a result of nextjs'
    fast-refresh
    which only occurs in the dev environment ... but i'm just sking to be sure.
    r
    • 2
    • 16
  • d

    Dale Watson

    04/04/2021, 11:44 AM
    hello im new in development here, i believe storing image shoudlnt be in DB, and my stack is postgress-prisma-next.js-vercel, so how to store images or large files ?
    m
    p
    • 3
    • 3
  • t

    Tom

    04/04/2021, 12:33 PM
    Hello, how can I import a (query)function from another file into my seed.ts? The create function for an (food) object in seed.ts is the same as for normal creation in my API route so I would like to import it from my routes/foods.ts into my seed.ts. The simplified functions looks like this (it actually has about 20 lines):
    Copy code
    export const createFood = async (food: CreateFood) => {
      const createdFood = await prisma.food.create({
        data: food,
      })
      return createdFood
    }
    I imported it into my seed.ts with:
    import { createFood } from './../api/routes/foods'
    And called it like this:
    Copy code
    async function main() {
      await createFood(food)
    }
    However if I run the seed command it never completes and always tells me Running ts-node "prisma/seed.ts" ... I think there might be an issue with different prisma clients?
    r
    • 2
    • 3
  • m

    manuel

    04/04/2021, 1:33 PM
    Hey! How do I know which row is the problem? thanks!
    m
    r
    • 3
    • 5
  • s

    Sadananda Raj

    04/05/2021, 2:46 PM
    Prisma deploy does not deploy the datamodel. It shows that the deployment is successful. But the new datamodel does not appear in the prisma playground or in prisma admin.
  • s

    Sadananda Raj

    04/05/2021, 2:48 PM
    what is solution ?
  • i

    Igor Mardari

    04/05/2021, 10:55 PM
    Recently I’ve finished the first version of
    NestJS + Prisma ORM + TypeScript
    REST API starter https://github.com/7codeRO/nest-prisma-rest-api-boilerplate Please check it out! Feedback would be appreciated!
    👍 2
    👀 3
  • e

    Erik C

    04/05/2021, 11:33 PM
    If I want to avoid typing out tons of typedefs by hand, and instead have only one place for the source of truth, I suppose I would go with a code first approach, right?
  • e

    Erik C

    04/05/2021, 11:33 PM
    If so, I believe Nexus could be the way to go, but is Apollo code generator another option I could go with?
    r
    • 2
    • 2
  • s

    Samson Ssali

    04/06/2021, 5:03 AM
    hello guys... this error has finally made it impossible for me to proceed
    Copy code
    error: sorry, too many clients already
    Any solution out here?
    r
    • 2
    • 2
  • j

    Justin Ellingwood

    04/06/2021, 1:59 PM
    Hey friends 👋 just wanted to give you a heads up about two new guides we've published to Prisma's Data Guide: Using the expand and contract pattern for schema changes and Setting up a local SQL Server database As always, any feedback is welcome!
    💯 3
    fast parrot 2
  • d

    Dale Watson

    04/07/2021, 12:01 AM
    hello again, new dev here so prisma can query and search data with
    findMany
    in that case, do i still need elastic-search for massive query data ?
    r
    • 2
    • 1
  • d

    Dale Watson

    04/07/2021, 12:02 AM
    ## also currently im using db:sqlite local and going to move to postgress, this term is called as migration right ?
    r
    • 2
    • 1
  • j

    Johan

    04/07/2021, 2:32 PM
    Can anyone tell me what the API to extract a schema out of a database? I need the metadata such as the tables and column names with all data types. Thanks
    r
    j
    • 3
    • 4
  • n

    Natalia

    04/07/2021, 2:54 PM
    Prisma Meetup is on tomorrow, 6PM CEST! 🤗 We will have our Product Manager, Spiros Martzoukos, talk about Launching the Prisma Data Platform and Luc Matagne will tell us how his company, Iopool, uses Prisma. You will also have a chance to win the Designing Data-Intensive Applications book by Martin Kleppmann in our raffle. You can

    set a YouTube reminder▾

    or RSVP on Meetup. Hoping to see you all there! prisma rainbow
    💯 4
    prisma rainbow 7
    🐷 2
    🐗 1
    fast parrot 3
    🌊 2
  • e

    Evan Jia

    04/08/2021, 8:12 AM
    Hi guys, I’m researching the possibility of making prisma engine as a microservice in our cluster. I looked at some of the source codes and find that currently the url of the engine is hardcoded to be
    localhost
    . I’d like to ask if there is any plan to support the use case I mentioned (point the engine endpoint url from the client and start a standalone engine), further more, I want to ask what’s the plan for NodeEngine since the napi is in preview. Do you guys want to replace the NodeEngine with NapiEngine or keep both?
    r
    n
    • 3
    • 4
  • m

    Mykyta Machekhin

    04/08/2021, 12:30 PM
    Hello guys. When im calling
    prisma migrate
    , I have next error. Because prisma try to apply seed before apply migrations. How I can apply migration without seeds?
    r
    • 2
    • 18
  • n

    Natalia

    04/08/2021, 2:26 PM
    prisma rainbow It's an exciting evening for Prisma today - we are appearing in two livestreams! • Prisma Meetup -

    6:00 PM CEST on YouTube▾

    - with Spiros Martzoukos, Product Manager at Prisma, and Luc Matagne from Iopool. We will also host a raffle where you can win the "Designing Data-Intensive Applications" book. 📚 • Learn with Jason - 6:30 PM CEST on Twitch - where our Developer Success Lead, Nikolas Burk, will be a guest. See you there! fast parrot
    fast parrot 4
    💯 4
    prisma rainbow 4
  • w

    William Chantry

    04/08/2021, 5:25 PM
    How does the prisma client know/tell typescript when you use the
    select
    argument on a
    find
    that the return type only includes the selected items? (example in thread)
    e
    r
    • 3
    • 5
  • n

    Nivesh Mittapally

    04/09/2021, 8:30 AM
    Can we create multiple schema files for each model we create?
    f
    • 2
    • 1
  • g

    go4cas

    04/09/2021, 1:09 PM
    Hey guys ... can one connect Prisma to multiple connections/databases in the same app?
    j
    r
    • 3
    • 2
  • j

    Jamie

    04/09/2021, 7:58 PM
    Hi all. I'm looking to build a MVP with NextJS, ideally Koa with Apollo server (or Postgraphile) so I'm trying to determine if Prisma would be a better fit
  • j

    Jamie

    04/09/2021, 8:01 PM
    Does Prisma auto generate models and resolvers from Postgres schema?
    b
    • 2
    • 1
  • a

    Alaa Zorkane

    04/09/2021, 10:33 PM
    it seems like the subset in the relations method args
    args?: Subset<T, ModelFindManyArgs>
    is messing with my intellisense, anyone got the same issue?
    r
    • 2
    • 1
  • j

    Joe

    04/10/2021, 11:32 AM
    I have sensor data for monitoring a solar array, mostly voltage, current, temperature. The data is stored on chips. I’d like to avoid the use of a database - would prisma be a good option to interface with the chip directly (through a custom adaptor) instead of a database adaptor? Is this a use case for prisma, or is prisma only intended to be used with databases?
    r
    • 2
    • 2
  • t

    Tushar Jain

    04/10/2021, 1:36 PM
    Hi, I have a small issue regarding importing/exporting of data from the demo db of Prisma1 (hosted on app.prisma.io - MySQL) to my self hosted Prisma1 db - PostgreSQL. I have exported the data from app.prisma.io server through prisma1 cli and when I import it in my self hosted db through the prisma1 cli, then the data is being imported, but data in an ID column isn't imported, but in other ID columns, in other tables, it is being imported correctly. For. there is a table Orders and it has 2 ID fields - userId and shopId, then the data in userId column is there, but the entire shopId column is blank. I tried the import/export many times, gives the same result. Both the userId and shopId contains ids auto-generated by prisma. What could be wrong here?
    r
    • 2
    • 1
1...426427428...637Latest