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

    Christoph Dietrich

    08/24/2021, 6:22 PM
    Regarding the 2.30.0 fulltext search… would it not be better for all, to put an array of strings [„cat“, „dog“] and not „cat | dog“ as search param ??
    r
    • 2
    • 1
  • m

    Mischa

    08/24/2021, 6:27 PM
    juiced about pg full text search
  • j

    Jaye

    08/24/2021, 7:41 PM
    pg full text search - will that work on a json column?
    r
    • 2
    • 1
  • j

    James

    08/24/2021, 9:40 PM
    Will there be support for DynamoDb in the future?
    r
    • 2
    • 2
  • m

    mjyoung

    08/24/2021, 10:24 PM
    What is the best practice for creating nexus schemas for GQL? I feel like I’m redundantly replicating all the model “definition”s based on my prisma schema. I’m sure I’m not doing this the optimal way but I can’t find any good documentation on this
    r
    • 2
    • 1
  • c

    Craig A. Cook

    08/24/2021, 10:36 PM
    Hi, I have a perplexing question here about using prisma. It appears to not see one of the fields on my table .. it found it when I did the npx prisma db pull, but a findMany() doesn't see it. It's the in the database itself, in the schema.prisma and in the GraphQL SDL.
    r
    • 2
    • 1
  • c

    Craig A. Cook

    08/24/2021, 10:37 PM
    I also tried to use a select, which showed it as an unknown field.
  • c

    Craig A. Cook

    08/25/2021, 1:00 AM
    Ok, I found the issue. If I use "@unique"" in the prisma.schema file, Prisma won't see that field (there were no duplicates in the DB). Does it require that the DB have the unique constraint on the column as well? Seems like an odd error to have -- totally cryptic.
  • c

    Craig A. Cook

    08/25/2021, 1:10 AM
    If I add the constraint to the DB and the directive "@ unique"" to the schema.prisma file, then it works. But if you have the constraint in the schema file but not in the DB, it just silently doesn't return that field in the API.
    r
    • 2
    • 1
  • a

    Alexei Snisarenko

    08/25/2021, 2:45 AM
    Hi there. Around the time of 2.30.0 release we started to experience problem of prisma failing on prisma generate step (npm install -> postinstall script -> prisma generate). This was only happening inside the github action responsible for deployment. In local environment there was no such issue. After specifying version 2.29.1 of prisma in dependencies section package.json the problem disappeared. I’m wondering if anybody else experienced such problem?
    r
    • 2
    • 4
  • b

    Brian

    08/25/2021, 6:43 AM
    Hi, I've got a question about Prisma's database handling. When using a
    prisma.yml
    file, how do I specify or get the
    prisma.sh
    website URL my database would be hosted at?
  • s

    See Jee

    08/25/2021, 8:40 AM
    Hi, maybe some of you can help me. I tried to find post with id but I am getting this error. Code
    Copy code
    const found = await this.prisma.post.findFirst({
          where: {
            postUid,
          },
        });
    Error
    Copy code
    Invalid `prisma.post.findFirst()` invocation:
    
    {
     where: {
      postUid: {
       postUid: '4d69bcaa-f3b8-4cb9-a3f7-bf164a8bae99'
       ~~~~~~~~~~~
      }
     }
    }
    
    Unknown arg `postUid` in where.postUid.postUid for type StringFilter. Available args:
    r
    • 2
    • 9
  • s

    slucky

    08/25/2021, 8:41 AM
    hi, how to clone amazon prisma engine binary mirror?
  • n

    Nicolas Sursock

    08/25/2021, 8:45 AM
    hello, something is strange on my website: i'm trying to give accurate feedback to the user as for the time remaining for complete import of csv file. it takes on average less than 1 second to insert the record in the db but when using a timer i get a strange value of 30 seconds
    Copy code
    import160: 35794.5400390625 ms
    App.js:114 35.795
    App.js:104 import161: 35966.64892578125 ms
    App.js:114 35.967
    App.js:104 import162: 36198.051025390625 ms
    App.js:114 36.198
    `
    Copy code
    start = Date.now();
                  console.time("import" + index);
                  await <http://axios.post|axios.post>(process.env.REACT_APP_API_URL + "/movies", {
                    movie,
                  });
                  console.timeEnd("import" + index);
                  end = Date.now();
                  numImported++;
    r
    • 2
    • 3
  • t

    Tarik Brat

    08/25/2021, 9:15 AM
    hi guys and girls, I was wondering if there's any way to inject raw query into methods or can I somehow get query that's formatted by prisma?
    r
    • 2
    • 1
  • b

    Benjamin Kroeger

    08/25/2021, 10:08 AM
    How do you guys run
    prisma migrate deploy
    in your kubernetes environments? I'm currently thinking
    init containers
    might be the way to go - does it hurt to run
    prisma migrate deploy
    whenever a pod is rescheduled?
    r
    p
    • 3
    • 10
  • p

    Peter Albert

    08/25/2021, 11:02 AM
    Hi everyone! Is there a way to log the generated SQL in a text file? Background: We build some complex data migration from the old data source to the new Prisma based Postgresql DB. All writes to the new DB are done via Prisma Client. However, not everybody in the dev team can run this data migration, esp on their local dev machines as this requires access to the old database. So I would like to generate a seed data SQL file - and it would be easiest by simply logging all the INSERT and UPDATE statements triggered by Prisma... Thanks
    r
    • 2
    • 6
  • c

    Carlos Gomez

    08/25/2021, 4:14 PM
    Has anyone experienced slowness with VS Code's Autocomplete/IntelliSense when using Prisma?
    t
    s
    • 3
    • 4
  • u

    user

    08/25/2021, 4:29 PM
    JS Monthly Online #17

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

    Join us for another episode of technical tales, programming problems and slick solutions. ◭ Double up your component and integration tests with Supertest & Nock - Lewis Prescott This talk builds on my course for Test Automation University (https://testautomationu.applitools.com/javascript-api-testing/) Using the power of mocking and the tool Nock. You can build component and integration tests with one set of scripts. I will show you how this is possible and also explain the difference between component and integration tests. In order to make your tests fast and build tests at the right level, use the power of mocking. ◭ Heavily Connected Data Applications / Daniel Olavio Ferreira In my talk, I will be showing how complex it can get when having to deal with SQL table relations with some mainstream ORMs, such as TypeORM and Sequelize. I will compare them to how Prisma deals with it using a simple yet powerful schema syntax, and an intuitive query client. ◭ Anonymous video calling app using machine learning- Ben Butterworth By turning on the webcam during video calls, we reveal our face, identity, race/ ethnicity, disabilities and living conditions. We also don't always feel like putting our camera on when talking to other people over video calls. We are also unusually quiet (or muted) when listening to someone on these calls. What if we could have video calls, but still avoid all these issues? Anonymous video calls allow you to communicate with someone using your facial expression and animation, without revealing your identity, physical background or other sensitive information. It allows you to safely share expressions and emotion. Your webcam feed is processed locally, sending only the minimal amount of data which represents your virtual face. You can try it at https://github.com/ben-xD/club/ 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
  • b

    Bruno Casado

    08/25/2021, 8:57 PM
    guys i need your help. I've split a piece of code that have prisma schema definitions. i put all together into a lib and have import onto a serverless function. the problem is that my serverless function import this lib via git, so the prisma client isn't generated. what is the best practice to import a lib that uses prisma?
    r
    • 2
    • 4
  • k

    Kunal Shah

    08/25/2021, 8:59 PM
    Hello hello! We’re thinking of using Prisma over at Levels, but would love to get some perspective of using it on a larger team/project. has anyone here migrated to prisma with a team of >~20 engineers who would be interested in hopping on a short call? 🙂
  • m

    Manish

    08/26/2021, 4:59 AM
    Hello, I’m trying to connect my database to prisma data platform at cloud.prisma.io However, it says “The hosted database needs to be empty and you need read and write permissions” But mine is an existing database, and it has data. Why should it be empty? What will happen if I connect?
    s
    • 2
    • 4
  • u

    user

    08/26/2021, 9:04 AM
    Using the
    db push
    Command to Sync our Schema With the Database

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

    Blog Post: https://www.prisma.io/blog/fullstack-nextjs-graphql-prisma-oklidw1rhw Code: https://github.com/m-abdelwahab/awesome-links 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
  • t

    Tarik Brat

    08/26/2021, 10:43 AM
    Hi everyone, I have tsvector type column in my postgres db and I'm getting this error when running raw query with prisma: `Raw query failed. Code:
    N/A
    . Message: `error deserializing column 21: cannot convert between the Rust type
    core::option::Option<alloc::string::String>
    and the Postgres type
    tsvector
    r
    • 2
    • 1
  • t

    Tarik Brat

    08/26/2021, 12:46 PM
    I'm trying to create tigger function but I cannot use $$ delimeter, then I tried with ' and it worked but I'm receiving this error: `The column
    new
    does not exist in the current database.`
    r
    • 2
    • 11
  • m

    Mischa

    08/26/2021, 1:37 PM
    would it be possible to preserve table/column comments when pulling/reflecting a database schema?
    r
    • 2
    • 3
  • b

    Bård

    08/26/2021, 1:55 PM
    Hey! In the docs: https://www.prisma.io/docs/reference/api-reference/prisma-client-reference/#aggregate It says that the aggregate function should be able to have the distinct options field. But when I try to run it I get the error:
    Copy code
    Unknown arg `distinct` in distinct for type AggregateSeed
    My code:
    Copy code
    const seeds = await prisma.seed.aggregate({
      distinct: ['schoolKey'],
      where: {
        score: {
          not: null,
        },
      },
      _sum: {
        score: true,
      },
    });
    r
    • 2
    • 2
  • p

    Peter Boomsma

    08/26/2021, 4:14 PM
    I have a mutation to delete all records in a table:
    Copy code
    removeAllMovies: () => {
        return prisma.movie.deleteMany({});
      },
    what would be the correct syntax in the schema to reflect this resolver?
    Copy code
    type Mutation {
        removeAllMovies()
      }
    obviously doesn't work ^^
    r
    • 2
    • 1
  • c

    cedric

    08/26/2021, 4:16 PM
    hi all, we have an app where we want a hybrid of prisma-managed postgres tables and non-prisma managed tables. the latter category is primarily because we’re doing some detailed sql stuff that prisma isn’t yet able to support. we’re running into an issue where prisma seems very eager to delete tables that aren’t mapped in our schema.prisma file. i see a
    --create-only
    migrate flag that does a dry run for schema migrations but i’m wondering if there’s also a
    --dont-delete-tables-you-dont-know-about-pretty-please
    flag as well?
    d
    r
    • 3
    • 17
  • c

    cedric

    08/26/2021, 4:20 PM
    we’d considered creating a separate postgres schema for those unmanaged tables but prisma doesn’t seem to scope its migrations to a specific schema as schema name doesn’t seem to be an officially-supported parameter of the libpq database url pattern
1...474475476...637Latest