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

allow dev npm script to run prisma db migration #122

Open
nickvisut opened this issue May 17, 2024 · 1 comment
Open

allow dev npm script to run prisma db migration #122

nickvisut opened this issue May 17, 2024 · 1 comment
Labels

Comments

@nickvisut
Copy link
Collaborator

Currently, prisma schema changes cause local dev to error out (usually referring to something like a missing field) unless a prisma migration is executed. One way around this is to manually run the build script after seeing said errors.

As a potential way to automate this and improve DX, this issue proposes to run the migration as part of the dev script.

  • Optionally, it can first test if a migration needs to be done before actually running the migration task to save developer time
    • this test already exists as the npm script check-migrate, which return a non-empty output if a migration needs to be done; this can be incorporated into logic to either migrate or not instead of always attempting a migration
@nickvisut
Copy link
Collaborator Author

Noting here that there is already an issue that appears to address this, albeit w/a different approach. Look into possibly consolidating the two.

Related to #80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

1 participant