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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync test DB from schema using its SHA1 #36870

Merged
merged 1 commit into from Aug 6, 2019
Merged

Commits on Aug 6, 2019

  1. Sync test DB from schema using its SHA1

    Previously, we used the migration status to determine whether the test
    database(s) needed to be reloaded from the schema. This worked in most
    cases, but if a schema.rb was modified outside of migrations or if a
    migration was rolled back, it would require a manual db:test:prepare.
    
    This commit updates load_schema to record the SHA1 of the loaded schema
    file inside of the ar_internal_metadata table. We can then use this SHA
    to determine whether we should reload the schema.
    
    This ensures that the test DB stays exactly in sync with the schema
    file, including rollbacks which fixes a test marked TODO.
    jhawthorn committed Aug 6, 2019
    Copy the full SHA
    ba093a5 View commit details
    Browse the repository at this point in the history