GithubHelp home page GithubHelp logo

Comments (2)

kevin-dp avatar kevin-dp commented on May 20, 2024

Hi @barbalex,
I did not find the time to look deep into this issue, but from your description this looks like a Prisma issue.
Your files table defines foreign keys to accounts, projects, actions, etc. Therefore, Prisma will define a relation field from that other table to files. If there is only a single relation from that other table to files, i believe it will use the name of that other table (i.e. files) as the name of the relation field. Now, in your case, this leads to a name clash because the table actions already has a column named files.

If you open .electric_migrations_tmp_a8tY7C/prisma/schema.prisma you will probably see that the generate Prisma schema has two fields named files on the accounts model, one that represents the boolean files column you defined in your Postgres schema, and one that represents the reverse FK relation with the files table.

I'd suggest renaming either the files table or the files column on the action table to avoid this name clash.

from electric.

barbalex avatar barbalex commented on May 20, 2024

@kevin-dp

You are 100% right, it seems. Thanks a lot!

I now renamed the fields. The shema builds so I suppose that was correct.
I do get a different issue now though: #750

from electric.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.