Add spec for schema.rb
What does this MR do?
It adds a new spec to check:
- If
db/schema.rb
defined version equals the latest migration file's timestamp both fromdb/migration
anddb/post_migrate
directories. - If
db/schema.rb
defined version equals the latest migration's timestamp stored in the database'sschema_migrations
table.
Are there points in the code the reviewer needs to double check?
I did not use
require Rails.root.join('db', 'schema')
to prevent extra database initializing in the spec.
Why was this MR needed?
It's needed to prevent schema.rb version mismatching.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #21978 (closed)