Skip to content

Commit 9fa7dee

Browse files
committed
Auto merge of #1611 - sgrif:sg-locked-schema, r=jtgeibel
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)
2 parents e5c60e2 + 1cdb355 commit 9fa7dee

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.diesel_version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.3.0
1+
1.4.0

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ install:
3030
- cargo install --force diesel_cli --vers `cat .diesel_version` --no-default-features --features postgres && export PATH=$HOME/.cargo/bin:$PATH
3131

3232
before_script:
33-
- diesel database setup
33+
- diesel database setup --locked-schema
3434

3535
addons:
3636
chrome: stable

Procfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
web: bin/diesel migration run && bin/start-nginx ./target/release/server
1+
web: bin/diesel migration run --locked-schema && bin/start-nginx ./target/release/server
22
worker: ./target/release/update-downloads daemon 300

0 commit comments

Comments
 (0)