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

    Oluwasetemi Ojo

    07/15/2021, 12:20 PM
    Has anyone encountered this problem.
  • a

    Arun Kumar

    07/15/2021, 12:48 PM
    I just read an article that
    migrate deploy
    command doesn't rely on the schema file for migrations. From where does it fetch the DB URL?
    r
    j
    • 3
    • 6
  • j

    jignesh karamchandani

    07/15/2021, 1:49 PM
    👋 How can I get the difference between two dates while reading from the db?
    r
    • 2
    • 4
  • a

    Alex Vilchis

    07/15/2021, 2:05 PM
    Hi there, guys 👋🏼 I am encountering this problem when executing a
    createMany
    call. As you can see, the data that I pass to it are careers with unique names, so the message doesn't make sense to me 😕 I'll attach the relevant schema portions in this thread. Thanks!
    ✅ 1
    t
    • 2
    • 4
  • s

    Sai Diddigam

    07/15/2021, 2:45 PM
    hey prisma community, I have a prisma schema with me and I want to generate graphql schema from it, so I looked for nexus-prisma and I'm getting dependency errors while installing it cuz it currently supports prisma client upto v2.25 only, where I have v2.27. Are there any other plugins or is it better for me to downgrade prisma client? thanks
    r
    • 2
    • 2
  • t

    Tyler Storm

    07/15/2021, 2:56 PM
    Anyone aware of a way to createMany but overwrite duplicates (using postgres)? Use case is that I have a large amount of data streaming in (10K+ records) and using multiple upserts to update existing records or create records if they don’t exist seems to be slow. Could this potentially be implementation issue on my end with my DB model or maybe I’m stretching the limits of what prisma should be used for?
  • d

    Daniel Norman

    07/15/2021, 2:59 PM
    Join us for What’s new in Prisma 2.27!

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

    Going live in a minute 🤩
    ✅ 1
  • a

    Aman Tiwari

    07/15/2021, 4:33 PM
    any docs or resource for role based acess control in prisma 2?
    b
    • 2
    • 3
  • o

    Oluwasetemi Ojo

    07/15/2021, 8:20 PM
    what is the best way to save timestamp with prisma modelling.
    n
    • 2
    • 2
  • o

    Oluwasetemi Ojo

    07/15/2021, 8:22 PM
    I tried BigInt but serialization issues
  • n

    Nour Elba

    07/15/2021, 9:06 PM
    (Next.js + Prisma question) Hi! Not sure if this is the right place to ask this, but does anyone have a resource on how to separate using Prisma from the frontend when using Next.js API routes? Basically want to move all my Prisma API calls to a different repo entirely...is it just a matter of creating an Express server (or similar) with the same schema file?
    c
    • 2
    • 1
  • j

    Jon Deibel

    07/15/2021, 11:33 PM
    I am trying to upgrade from 2.2.0 to 2.27.0. I am having issues getting migration to sync up with my existing DB without trying to blow the whole thing away. That is a non-starter since I have a production DB that has been running awhile now.
  • j

    Jon Deibel

    07/15/2021, 11:34 PM
    I use the 2.2.0 version of migrate to manage the schema ATM
  • j

    Jon Deibel

    07/15/2021, 11:34 PM
    I know they are incompatible, but is there a way to preserve the DB and just update my schema or something like that?
  • k

    Kent C. Dodds

    07/16/2021, 12:28 AM
    I have a multi-regional deploy of postgres db. There's a primary region where writes are allowed. Every other region does not allow writes (only reads) for consistency. When a write is made to the primary region, that write is propogated automatically to the other regions in the cluster. My question is, is it possible to provide two different database URLs? One for reads and the other for writes?
    j
    c
    b
    • 4
    • 25
  • i

    Ian

    07/16/2021, 5:44 AM
    Copy code
    FROM            shipments   S 
    INNER JOIN      products    P   ON S.productId = P.productID  
    LEFT OUTER JOIN customers   C   ON S.companyId = C.customerId AND S.ShipmentType = 'export'
    LEFT OUTER JOIN suppliers   SP  ON S.companyId = SP.supplierId AND S.ShipmentType = 'import'
  • i

    Ian

    07/16/2021, 5:44 AM
    Copy code
    How to achieve this type of join in prisma? Where the join is conditional? Only execute the join depends on the parent type... So there's no useless join lookup because you know no value will ever be there because of table type
  • i

    Ian

    07/16/2021, 5:44 AM
    😇😇
  • i

    Ian

    07/16/2021, 5:52 AM
    Another example
    Copy code
    FROM       posts
    INNER JOIN like    ON posts.id = likes.postId
    LEFT  JOIN votes   ON posts.id = votes.id     AND posts.type = 'poll'
    LEFT  JOIN answers ON posts.id = answers.id   AND posts.type = 'questions'
    r
    • 2
    • 1
  • i

    Ian

    07/16/2021, 5:54 AM
    Copy code
    Here only execute join for votes if   posts.type = 'poll'
    Here only execute join for answers if posts.type = 'questions'
    
    So we dont waste join look up for votes if the post type is questions
  • v

    Vaughn Melson

    07/16/2021, 5:57 AM
    My questions are related to structuring a Product Description table that requires version control. - Would adding an auto incrementing versionId to the main table be advisable? - Or, is it preferable to split data over multiple tables?
  • u

    user

    07/16/2021, 9:10 AM
    Build Fullstack Apps in Record Time with Blitz.js - Simon Knott | Prisma Day 2021

    https://www.youtube.com/watch?v=ON8V-OYHrEs▾

    Blitz.js is the Fullstack React Framework. It's heavily inspired by Ruby on Rails and is focused on making you as productive as possible. It's built on Next.js and adds all the missing pieces you need for building a fullstack app with a database. By far the biggest innovation of Blitz is the new "Zero-API" data layer that abstracts away the API so you don't have to mess with REST or GraphQL APIs! Simon will introduce all the important parts & guide you through getting started with Blitz, so you'll know if you might want to use it or not. Learn more about Prisma: ◭ Website: https://www.prisma.io​​​ ◭ Docs: https://www.prisma.io/docs​​​ ◭ Quickstart: https://www.prisma.io/docs/getting-started/quickstart-typescript
  • u

    user

    07/16/2021, 9:10 AM
    Introduzione pratica a Prisma - Francesco Pigozzi | Prisma Day 2021

    https://www.youtube.com/watch?v=1-wCE4mj4Vo▾

    In questo workshop impareremo quali sono le basi di Prisma e le principali differenze da un ORM tradizionale. Esploreremo le operazioni di base e le applicheremo ad API REST con Express e GraphQL con Apollo Server. Al termine del workshop, avremo acquisito le conoscenze necessarie per poter utilizzare Prisma nei nostri progetti. Parleremo, inoltre, di quali sono i prossimi passi per continuare a scoprire questo ecosistema. Learn more about Prisma: ◭ Website: https://www.prisma.io​​​ ◭ Docs: https://www.prisma.io/docs​​​ ◭ Quickstart: https://www.prisma.io/docs/getting-started/quickstart-typescript
  • u

    user

    07/16/2021, 9:10 AM
    Практическое введение в Prisma - Makar Stetsenko | Prisma Day 2021

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

    Prisma - это набор инструментов для работы с базой данных: Client, Migrate и Studio. Каждый из них решает свою задачу и может быть использован независимо друг от друга. Однако, по-настоящему инновационность подхода чувствуется, когда вы начинаете использовать их вместе. На этом воркшопе вы познакомитесь с инструментами Prisma, опишите модель данных с помощью Prisma schema для SQLite базы, сделаете несколько миграций через Prisma Migrate, затем научитесь делать типизированные CRUD запросы, используя Prisma Client, чтобы реализовать REST и GraphQL API. Участники смогут оценить удобство всего инструментария, ведь нам не пригодятся знания SQL или SQLite. Learn more about Prisma: ◭ Website: https://www.prisma.io​​​ ◭ Docs: https://www.prisma.io/docs​​​ ◭ Quickstart: https://www.prisma.io/docs/getting-started/quickstart-typescript
  • u

    user

    07/16/2021, 9:10 AM
    Building a TodoApp with Wasp - a DSL for building web apps - Matija & Martin Šošić | Prisma Day 2021

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

    Wasp is a simple configuration language that enables developers to build full-stack Javascript (React + Node) web apps with 10x less code. During this workshop we will build a full-stack Todo App together from the scratch in Wasp. Basic knowledge of Javascript and React is expected. Learn more about Prisma: ◭ Website: https://www.prisma.io​​​ ◭ Docs: https://www.prisma.io/docs​​​ ◭ Quickstart: https://www.prisma.io/docs/getting-started/quickstart-typescript
  • s

    Swapnull

    07/16/2021, 9:45 AM
    Hey 🙂 I have had a couple of new devs join my team and II am looking for a way to introduce them to prisma. They have a version of our database with test data, so ideally I would like a way for them to be able to connect and write prisma queries in the browser that shows them the data live - like graphql playground. We are not using graphql for this, the point is to explore the raw
    db.users.findMany…
    type requests. Does anybody know if something like this exists? I have searched the slack and docs but can’t find reference to anything, so hoping for a community project or something.
    d
    j
    • 3
    • 3
  • e

    ElectricReality

    07/16/2021, 9:57 AM
    Hey'all! Was wondering if anyone has managed to run local replica sets without error(s) from Prisma Client? I tried running a local replica set and it still keeps on returning the
    Transactions are not supported by this deployment error
    . As per docs, i followed the instructions provided by the mongodb documentation on starting replicasets.
    j
    • 2
    • 1
  • u

    user

    07/16/2021, 10:55 AM
    Primeiros passos com Prisma e TypeScript - Luís Rudge | Prisma Day 2021

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

    Sabe aquele trabalho entediante de ficar escrevendo consultas SQL e criando classes para representar suas tabelas do banco de dados? Com o Prisma.io, isso é coisa do passado! Neste workshop, você vai aprender a utilizar o Prisma.io para facilitar o acesso aos dados da sua aplicação. Vamos começar do básico, entendendo seu funcionamento e como você pode começar a utilizar o Prisma.io de maneira simples. Depois de aprender um pouco sobre modelagem e consulta ao banco de dados, vamos criar uma API REST com Express e outra API GraphQL com Apollo GraphQL. Ao final do workshop, você poderá criar suas próprias APIs, REST ou GraphQL, utilizando o Prisma.io como facilitador de acesso aos dados. Learn more about Prisma: ◭ Website: https://www.prisma.io​​​ ◭ Docs: https://www.prisma.io/docs​​​ ◭ Quickstart: https://www.prisma.io/docs/getting-started/quickstart-typescript
  • l

    Lionel Okpeicha

    07/16/2021, 2:29 PM
    I'm can't use apollo Studio. After migration for Graphql playground. When I try to run in localhost and redirect me to apollo studio sanbox https://studio.apollographql.com/sandbox?endpoint=http%3A%2F%2Flocalhost%3A5018%2Fgraphql: Unable to connect to localhost. Please help to solve this
  • m

    Michael Madsen

    07/16/2021, 3:36 PM
    I'm upgrading from prisma1 to prisma2 and am having problems getting field resolvers working in nexus. I am using
    nexus-prisma
    Just a little lost on what I'm missing and need some help.
    • 1
    • 2
1...459460461...637Latest