Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v0.25] - Prisma migrate dev now handles schema path with spaces #1753

Merged
merged 2 commits into from
Feb 8, 2021

Conversation

dthyresson
Copy link
Contributor

Addresses #1749

Ran

yarn rw prisma migrate dev --create-only

Because my path has spaces and parentheses in it on OSX, I get and error seen before with storybook and other commands where the path isn't surrounded by quotes, etc.

$ '/Users/dthyresson/some path (with parens)/projects/redwoodjs/some_app/node_modules/.bin/rw' prisma migrate dev --create-only
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `yarn prisma migrate dev --create-only --preview-feature --name migration --create-only --schema /Users/dthyresson/some path (with parens)/projects/redwoodjs/some_app/api/db/schema.prisma'

...

Unknown arguments: create-only, createOnly, dev
error Command failed with exit code 1.

Modified

      autoFlags.push('--schema', `"${paths.api.dbSchema}"`)

so that uses quotes for schema path.

Now:

yarn rw prisma migrate dev --create-only

...

warn @prisma/cli has been renamed to prisma.
Please uninstall @prisma/cli: yarn remove @prisma/cli
And install prisma: yarn add prisma
Prisma schema loaded from db/schema.prisma
Datasource "DS": PostgreSQL database "redwood-app-dev", schema "public" at "localhost:undefined"

✔ Drift detected: Your database schema is not in sync with your migration history.

We need to reset the PostgreSQL database "redwood-app-dev" at "localhost:undefined".
Do you want to continue? All data will be lost. … no

@github-actions
Copy link

github-actions bot commented Feb 7, 2021

@dthyresson dthyresson merged commit de32e09 into redwoodjs:main Feb 8, 2021
@thedavidprice thedavidprice added this to the v0.25.0 milestone Feb 9, 2021
@dthyresson dthyresson deleted the dt-prisma-command-space-path branch December 23, 2021 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[v0.25 release dependency] RW Prisma Command improvements (discussion)
3 participants