Skip to content

prisma2 lift save fails on PostgreSQL #919

Closed

Description

After upgrading to 2.0.0-preview016.1 running prisma2 lift save fails with following error on PostgreSQL database:
image

Deleting migrations and reseting database didn't help.

Activity

  1. marcantoine commented on Nov 12, 2019

    @marcantoine

    I've got the same error while trying to use lift with previous migration (error on lift up or down)
    The error appeared with version 2.0.0-preview016 and is still occuring with 2.0.0-preview016.2

    Error parsing the migration steps: Error("unknown field name, expected model", line: 1, column: 61)'

    Everything works fine on 2.0.0-preview015

    The migrations steps were generated with 2.0.0-preview014.2

  2. kokokenada commented on Nov 13, 2019

    @kokokenada

    As per #884, adding sslaccept=accept_invalid_certs to your datasource url fixes this.

    To make matter worse the error message is not displayed when running in Netlify build. Just a mysterious:

    7:23:26 PM: The above error occurred in the <TabIndexProvider> component:
    7:23:26 PM:     in TabIndexProvider
    7:23:26 PM:     in App
    
  3. pantharshit00 commented on Nov 14, 2019

    @pantharshit00
    Contributor

    Can you all check if sslaccept=accept_invalid_certs fixes this error? Otherwise please tell me how to reproduce this.

    The netlify issue is related to #313 and #554

  4. added
    bug/0-unknown
    kind/bug
    on Nov 14, 2019
  5. BiscuiTech commented on Nov 14, 2019

    @BiscuiTech

    I can confirm that the sslaccept=accept_invalid_certs does not in fact fix this entirely. I now have this error after adding the param:
    image

    EDIT:
    Just to clarify, I did get the original error, without adding the param. In this image, the first error is without the added param, and the second error is with:
    image

  6. SvitlanaShepitsena commented on Nov 14, 2019

    @SvitlanaShepitsena

    Well, I added these params and it helped in my case on ubuntu 19.10. What was that - I did not have time to figure out :-). Hope it would help you guys.

    &sslmode=verify-ca&sslfactory=org.postgresql.ssl.NonValidatingFactory

  7. marcantoine commented on Nov 14, 2019

    @marcantoine

    Reinstalled preview16.2, I still have the same error. I tried adding @kokokenada sslaccept=accept_invalid_certs as well as @SvitlanaShepitsena &sslmode=verify-ca&sslfactory=org.postgresql.ssl.NonValidatingFactory in my connection string.

    image

  8. pantharshit00 commented on Nov 15, 2019

    @pantharshit00
    Contributor

    @marcantoine Can you please share your datamodel?

    @BiscuiTech Can you please tell me where your database is hosted?

    I think we should wait while we patch #884

  9. tomhoule commented on Nov 15, 2019

    @tomhoule
    Contributor

    I think this is related to the change in the format of migrations. See the "Breaking changes" section in the latest release notes

  10. marcantoine commented on Nov 15, 2019

    @marcantoine

    Thank you @tomhoule i missed this point in the release notes, this totally looks like my error.

  11. tomhoule commented on Nov 15, 2019

    @tomhoule
    Contributor

    Glad to help, if that worked :)

  12. BiscuiTech commented on Nov 15, 2019

    @BiscuiTech

    @marcantoine Can you please share your datamodel?

    @BiscuiTech Can you please tell me where your database is hosted?

    I think we should wait while we patch #884

    Database is hosted on DigitalOcean (Managed DB)

    I think this is related to the change in the format of migrations. See the "Breaking changes" section in the latest release notes

    I just did what was in there and the issue persists. I also have no problems with my workstation back home, just my work laptop. I just realized that it may be because my home station probably isn't updated to v16. I'll have to check.

  13. divyenduz commented on Jan 9, 2020

    @divyenduz

    "Error parsing the migration steps". This error happens when the internal representation of lift (the migration engine) has a breaking change.

    Since, we are in preview, although we try to contain the surface area of breaking changes, this one is acceptable.

    The workaround is to remove your migrations and the migration table and start from scratch wrt migration. Does that make sense?

    I am closing this one, if the problem persists for you, please comment here or reach out to me in our slack: https://slack.prisma.io.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug/0-unknownkind/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions