Skip to content

Fix untracked db changes CI check#1003

Merged
JulianPasquale merged 7 commits intomainfrom
fix-untracked-db-changes
Mar 11, 2025
Merged

Fix untracked db changes CI check#1003
JulianPasquale merged 7 commits intomainfrom
fix-untracked-db-changes

Conversation

@JulianPasquale
Copy link
Contributor

Description:

When we add a new migration we expect the CI to check that the db/schema.rb has been updated accordingly, and that's why we have a step to "Check for untracked changes in schema.rb".

As evidence you can see this CI execution. In this commit a new table was added. Since the CI is using the schema to setup the database, but that file was not updated, the check for untracked changes step was not failing.

By running a migrate step after loading the schema, we ensure all the differences in the schema or models annotations are applied.

Note: I'm also changing the order of the steps so the untracked changes check is performed before the assets precompile to save some time in case that fails.

@JulianPasquale JulianPasquale requested a review from a team March 11, 2025 17:25
Copy link
Member

@santib santib left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:nice:

@JulianPasquale JulianPasquale merged commit 2988262 into main Mar 11, 2025
7 checks passed
@JulianPasquale JulianPasquale deleted the fix-untracked-db-changes branch March 11, 2025 17:58
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