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

    Natalia

    12/09/2020, 12:54 PM
    prisma cool Prisma Online Meetup: Migrate Edition is on today at 6PM CET! Join our very special guests: • PostgresQL Veteran Josh Berkus will walk you through how Postgres' query planner visualization tool works, with some tips on how to use it to fix broken queries; • Alberto Perdomo and Tom Houle from Prisma Migrate team will give us an update on this highly anticipated Prisma feature; • Dillon Raphael will present a marketplace app he's built with Blitz.js and Prisma and showcase how easy it is to work with relations in Prisma, especially inside a form. Find out more on Meetup and

    tune in on YouTube▾

    . prismo gif
    💯 6
    plus one +1 1
    🔥 1
    👩‍🍳 1
    😎 1
    prisma green 5
    📺 1
    🤟 1
    🥝 1
    postgres 1
    💚 1
    prisma xmas 1
    🧤 1
    fast parrot 6
    prisma rainbow 2
  • n

    Natalia

    12/09/2020, 4:59 PM
    prisma cool Prisma Online Meetup: Migrate Edition is on in 1 minute!

    Tune in here▾

    .
  • y

    Yiğit Rüzgar

    12/10/2020, 10:41 AM
    🙏 Hi. I lost 24 hours with this problem. Can you make any suggestions? When I run createDraft2 mutation, I get error. I show the problem in this video: t.ly/f2wd
    r
    • 2
    • 34
  • j

    Justin Ellingwood

    12/10/2020, 4:41 PM
    Hey friends 👋 we just published an article on Prisma's Data Guide about what database migrations are and how they work https://www.prisma.io/dataguide/types/relational/what-are-database-migrations
    🇰🇷 3
    prisma green 6
    🔥 7
    fast parrot 6
    prisma rainbow 2
    v
    • 2
    • 1
  • k

    KJReactor

    12/11/2020, 10:18 AM
    Hey anyone interested in partnering up for projects?
    r
    • 2
    • 1
  • s

    Slackbot

    12/14/2020, 9:51 AM
    This message was deleted.
    j
    d
    • 3
    • 3
  • v

    Veselin Stoyanov

    12/14/2020, 9:53 AM
    There a lot of this kind of requests recently. I still don’t get what the scheme is here…
    j
    • 2
    • 1
  • k

    KJReactor

    12/14/2020, 11:54 AM
    I remember reading somewhere different names can be used in place of foreign keys in the schema or something. Anyone have ideas about this?
    n
    b
    • 3
    • 10
  • n

    Natalia

    12/15/2020, 4:31 PM
    prisma cool Today at 6PM CET Prisma will host the December edition of BudapestJS Meetup!

    Tune in here▾

    . 🙌
  • a

    Ayobanjo Funsho

    12/15/2020, 8:51 PM
    hello
  • p

    Pieter

    12/15/2020, 9:46 PM
    Hi, I'm busy using the new prisma migrate. I was wondering if anyone has a solution for automating running migrations in CI (github actions) or on vercel during deployment
    t
    j
    • 3
    • 9
  • t

    tylim

    12/16/2020, 8:07 AM
    heh guys, what kind of value should i write into Datetime field? must i use ISO 8601-formatted strings, or can prisma understand js Date object? or can i use milliseconds integer?
    j
    • 2
    • 2
  • t

    temitayo ogunlolu

    12/16/2020, 9:53 PM
    Hey everyone, If you are a developer looking to build decentralize applications easily, we launched http://baseone.cloud in private beta. You can join our waitlist on the website and get updates on what we've been up to.
  • t

    temitayo ogunlolu

    12/17/2020, 12:11 PM
    Hey everyone, If you are a developer looking to build decentralize applications easily, we launched http://baseone.cloud in private beta. You can join our waitlist on the website and get updates on what we've been up to.
  • p

    Pieter

    12/17/2020, 12:19 PM
    I am running into an issue where
    fs
    module is not found. This happens while generating SSG pages with nextjs, so its not running in a browser, but still doesnt find fs for some reason. I only get the issue when I change my prisma output from the default output. Did the fix in 2.13.0 about accessing types in frontend only get done for default client output?
  • r

    Robin

    12/17/2020, 1:35 PM
    Hi. Totaly new and question regarding deployment: When my model changes, I need to run "prisma generate" which will generate new code for my models to the
    node_modules
    folder. When I check my new code in, this is not committed. So when I deploy my app to the server, the server does not have the new code until I run "npx prisma generate" there, too, right?
    r
    • 2
    • 3
  • r

    Robin

    12/17/2020, 1:35 PM
    So I will add the "npx prisma generate" to my deploy script then?
  • a

    Alex Ruheni

    12/17/2020, 2:03 PM
    Hello folks 👋🏾 prisma cool Join us for Today's What's new in Prisma Holiday Special episode! Daniel, Ryan and Nikolas from the Prisma team will look back on last week's release - v2.13.0 - and discuss the new Prisma Migrate Preview. We'll also review the entire year and discuss the highlights at Prisma. Tune in for some surprise guests, as we introduce more members from the Prisma Team in today's episode! 📌 Today at 5pm CET! 👉🏾 Watch the live episode here: 

    https://www.youtube.com/watch?v=wQo_Ii_IjXA▾

    prisma cool 6
    prisma rainbow 4
    🎉 4
    prisma xmas 4
    prismo gif 4
  • n

    Natalia

    12/17/2020, 4:01 PM
    We are live!

    https://www.youtube.com/watch?v=wQo_Ii_IjXA▾

  • j

    Jaafari El Housseine

    12/18/2020, 7:01 AM
    Prisma 1 user here 😞 How Prisma 1 deals with pagination using MySQL? Where can I see the generated query?
    d
    • 2
    • 5
  • r

    Robin

    12/18/2020, 12:17 PM
    My database has a few tables which all have the same schema, but their names vill vary (they are generated based on some runtime files). Any way to still use prisma for this?
    r
    • 2
    • 8
  • p

    Pieter

    12/18/2020, 3:05 PM
    I recall reading a while back something about a way to auto generate documentation from a prisma schema (or am I thinking of nexus framework?) but I cant find it. Googling documentation just gets me the docs (duh!)
    j
    • 2
    • 3
  • h

    Hassan Khan

    12/19/2020, 12:50 PM
    Anyone implement the video streaming functionality in react native? I want the same functionality we have in html video tag.
  • i

    Isidoro Ferreiro

    12/20/2020, 10:28 PM
    Hello, is there a way to access the context from the middleware?
    r
    n
    • 3
    • 6
  • b

    Bruno Casado

    12/21/2020, 4:31 PM
    hi guys, i'm here again to ask more one question 🙂 let me try to explain what i want to do. i've some sort of relations more or less like this.
    Copy code
    model Gene {
      id Int @default(autoincrement()) @id
      name String @unique
      heritage String
      createdAt DateTime @default(now())
      modifiedAt DateTime @default(now())
    
      @@map(name: "genes")
    }
    
    model Diagnose {
      id Int @default(autoincrement()) @id
      report_id String
      client_name String
      gender String
      birthdate String
      in_negative Boolean
      createdAt DateTime @default(now())
      modifiedAt DateTime @default(now())
      
      variants GeneVariants[]
    
      @@unique([report_id])
      @@map(name: "diagnosis")
    
    }
    
    model GeneVariants {
      id Int @default(autoincrement()) @id
      zygosity String
      localization String
      coding String
      protein String
      classification String
      transcrito String
      diagnose Diagnose @relation(fields: [diagnose_id], references: [id])
      diagnose_id Int
      gene Gene @relation(fields: [gene_id], references: [id])
      gene_id Int
    
      createdAt DateTime @default(now())
      modifiedAt DateTime @default(now())
      
      @@map(name: "diagnosis_genes_variants")
    
    }
    
    model GeneReferences {
      id Int @default(autoincrement()) @id
    
      explanation String
    
      gene Gene @relation(fields: [gene_id], references: [id])
      gene_id Int
      gender String
      
      createdAt DateTime @default(now())
      modifiedAt DateTime @default(now())
    
      interpretation GeneInterpretations[]
      
      @@map(name: "gene_references")
    
    }
    query example:
    Copy code
    public async getDiagnose(report_id: string): Promise<any> {
            const result = await this.database.instance.diagnose.findFirst({
                include: {
                    variants: {
                        include: {
                            gene: {
                                include: {
                                    GeneInterpretations: {
                                        where: {
                                            gender: 'how_filter_this_using_the_gender_diagnoses_top_level?'
                                        }
                                    }
                                }
                            },
                        }
                    },
                },
                where: {
                    report_id: report_id
                }
            });
            
            
            return result;
        }
    The question: how can i filter GeneInterpretations passing the top level gender?
    s
    • 2
    • 9
  • j

    Jaafari El Housseine

    12/22/2020, 10:49 AM
    I am getting this
    Copy code
    ["java.lang.UnsupportedOperationException: empty.head\n\tat scala.collection.immutable.Vector.head(Vector.scala:185)\n\tat com.prisma.deploy.connector.mysql.database.MySqlJdbcDeployDatabaseMutationBuilder.$anonfun$deleteRelationColumn$1(MysqlJdbcDeployDatabaseMutationBuilder.scala:135)\n\tat slick.basic.BasicBackend$DatabaseDef.$anonfun$runInContextInline$1(BasicBackend.scala:172)\n\tat scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:303)\n\tat scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:37)\n\tat scala.concurrent.impl.CallbackRunnable.run(Promise.scala:60)\n\tat akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55)\n\tat akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:91)\n\tat scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)\n\tat scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:81)\n\tat akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:91)\n\tat akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40)\n\tat akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:44)\n\tat akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)\n\tat akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)\n\tat akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)\n\tat akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)\n"]
    Prisma 1.34 fails to run a migration. I tried all I can and still same issue. I don’t want to drop tables & re-build from scratch again
    r
    • 2
    • 5
  • y

    Yiğit Rüzgar

    12/22/2020, 11:54 AM
    Hello there. I have included the next-auth package in the system. How can I get the session information to resolvers (query.ts & mutation.ts) at the back? (I can easily get it in the front-end section.) https://github.com/adnanfuat/gql-askprisma
    s
    r
    • 3
    • 4
  • j

    Jaafari El Housseine

    12/22/2020, 2:18 PM
    I checked some executed queries by Prisma and I noticed something pretty strange. Prisma is using nested queries instead of using
    JOINS
    why is that?
    • 1
    • 1
  • y

    Yiğit Rüzgar

    12/22/2020, 3:09 PM
    I want to add Autharizaton to the example here. Can you give me a tutorial link to guide? Also what is the best method for Autharizaton? @Ryan https://github.com/prisma/prisma-examples/tree/latest/typescript/graphql-nextjs
  • m

    Maciek K

    12/22/2020, 4:45 PM
    Hi, I'm about to do a full upgrade from Prisma 1 > Prisma 2 (prisma-binding to nexus). Already read the upgrade docs twice, but please anyone who went through that transition, share some experiences, caveats, precautions or anything that will help. Thank you #prisma1 #prisma2
1...409410411...637Latest