-
Notifications
You must be signed in to change notification settings - Fork 649
Use the --locked-schema
flag in Diesel 1.4
#1611
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
Conversation
This flag tells Diesel CLI to error if a command would change `src/schema.rs`, rather than updating it. By running this in CI and production builds, we ensure that no PR will pass which changes schema but doesn't modify this file (which has happened in the past)
@bors r+ |
📌 Commit 1cdb355 has been approved by |
Use the `--locked-schema` flag in Diesel 1.4 This flag tells Diesel CLI to error if a command would change `src/schema.rs`, rather than updating it. By running this in CI and production builds, we ensure that no PR will pass which changes schema but doesn't modify this file (which has happened in the past)
☀️ Test successful - checks-travis |
I'm seeing this error out on Heroku on staging, but running locally succeeds (as no changes to src/schema.rs are needed).
|
I'm thinking the issue is that we run |
Let's go ahead and revert for now then |
I'm working on a PR to remove this from just from the Procfile, unless you think we should revert the whole PR. |
This reverts a portion of rust-lang#1611. Heroku does not make a checkout of the source code available at runtime, so at the point in time we run migrations `src/schema.rs` will not exist, and will thus always fail this check. The `--locked-schema` check is still run on CI, so this still gives us confidence that our schema and `src/schema.rs` do not diverge.
No that's fine |
Remove `--locked-schema` when running migrations on Heroku This reverts a portion of #1611. Heroku does not make a checkout of the source code available at runtime, so at the point in time we run migrations `src/schema.rs` will not exist, and will thus always fail this check. The `--locked-schema` check is still run on CI, so this still gives us confidence that our schema and `src/schema.rs` do not diverge.
This flag tells Diesel CLI to error if a command would change
src/schema.rs
, rather than updating it. By running this in CI andproduction builds, we ensure that no PR will pass which changes schema
but doesn't modify this file (which has happened in the past)