Migration issues with "Save" and "Up" commands

Hi all -

I’m running into some issues when trying to run a migration. I get the following error message:

It says that the “save” command doesn’t exist in the new version of Prisma Migrate. Do I need to make an update, or should I be using a different method to create migrations?

Thanks,
Connor

Hi Conner! Thanks for checking in here on the Forums and apologies this went unanswered for a couple of days now. Holiday time ¯_(ツ)_/¯

If you haven’t already figured this out (or had some help on the Redwood Discord Chat), I can walk you through some steps to diagnose.

First off, can you confirm your Redwood version via:

  • yarn rw info
  • copy & past output in a reply

And the same for your Prisma version:

  • yarn prisma --version

For Prisma, if you’re on Redwood v0.21 you should see:

@prisma/cli          : 2.11.0
@prisma/client       : 2.11.0

On my machine using Redwood v0.21, which includes Prisma v2.11.0, your command is working just fine. I did the following test, however, and reproduced your error:

  • manually upgraded to latest Prisma v2.13.1: yarn add -W @prisma/sdk @prisma/client @prisma/cli
  • then tried: yarn rw db save "Posts update"
  • ran into the same error from your screenshot

If it’s the case that you manually added Prisma packages to your local project, I recommend you removed them from the respective package.json and reinstall via yarn --force. (Note: you might need to delete node_modules.)

Please keep me posted.

1 Like