Skip to content

Commit

Permalink
test: third case
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulKalho committed Oct 21, 2024
1 parent d3fcae8 commit e4e0cef
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/migrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
CHANGED_MIGRATION_FILES: ${{ steps.migration-changes.outputs.all_changed_files }}
run: |
if [[ -n "$CHANGED_MODEL_FILES" && -z "$CHANGED_MIGRATION_FILES" ]]; then
echo "Model Chages detected, but no corresponding migration changes."
echo "Model Chages detected, but no corresponding migration changes. Create the corresponding migrations."
exit 1
fi
Expand All @@ -55,3 +55,16 @@ jobs:
fi
echo "Changes look valid."
prevent-changes:
run: |
EXISTING_MIGRATIONS=$(git ls-tree -r HEAD --name-only | grep "core/alembic/versions/.*\.py")
for migration in $EXISTING_MIGRATION; do
if git diff --name-only HEAD | grep "$migration"; then
echo "An already existing migration should not be edited!"
exit 1
fi
done
1 change: 1 addition & 0 deletions core/alembic/versions/11cb4f286ec5_create_user_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def upgrade() -> None:
sa.PrimaryKeyConstraint("uuid"),
sa.UniqueConstraint("email"),
)
print("edit")
# ### end Alembic commands ###


Expand Down
2 changes: 0 additions & 2 deletions core/services/test_service/models/test_two.py

This file was deleted.

2 changes: 0 additions & 2 deletions core/services/user_service/models/test.py

This file was deleted.

0 comments on commit e4e0cef

Please sign in to comment.