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

Ensure the build script is run when migrations are added #987

Merged

Conversation

jtgeibel
Copy link
Member

When the timestamp on the migrations/ directory changes the build script will be run so that any pending migrations are run.

I've tested this on Linux, but management of timestamps on directories may be platform specific.

When the timestamp on the migrations/ directory changes the build
script will be run so that any pending migrations are run.

I've tested this on Linux, but management of timestamps on directories
may be platform specific.
@carols10cents
Copy link
Member

This worked for me when I did the following:

  • Ran cargo test to compile the tests
  • Deleted the test database
  • Ran cargo test without changing anything to confirm Following contribution guidelines, test database not migrated #988 (this doesn't fix that problem, unfortunately)
  • Ran diesel migration generate foo and put a silly query in
  • Ran cargo test, the migrations did get run and the tests passed!

bors: r+

bors-voyager bot added a commit that referenced this pull request Aug 22, 2017
987: Ensure the build script is run when migrations are added r=carols10cents

When the timestamp on the migrations/ directory changes the build script will be run so that any pending migrations are run.

I've tested this on Linux, but management of timestamps on directories may be platform specific.
@bors-voyager
Copy link
Contributor

bors-voyager bot commented Aug 22, 2017

Build succeeded

@bors-voyager bors-voyager bot merged commit 2de08d3 into rust-lang:master Aug 22, 2017
@jtgeibel jtgeibel deleted the build-script-migrations-timestamp branch August 23, 2017 23:00
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.

3 participants