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

Format and improve Alembic migration generation #396

Merged
merged 8 commits into from
Apr 19, 2024

Conversation

armanddidierjean
Copy link
Member

@armanddidierjean armanddidierjean commented Apr 4, 2024

Description

  • import app.type.sqlalchemy.TZDateTime in migration files for custom DATETIME objects
  • lint and format migration files
  • don't put the migration revision and down_revision in the file docstring as we usually forget to update them

Checklist

  • All tests passing
  • Extended the documentation, if necessary

Copy link

codecov bot commented Apr 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.47%. Comparing base (b3454a0) to head (477583d).

❗ Current head 477583d differs from pull request most recent head 310a562. Consider uploading reports for the commit 310a562 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #396   +/-   ##
=======================================
  Coverage   80.47%   80.47%           
=======================================
  Files          86       86           
  Lines        5766     5766           
=======================================
  Hits         4640     4640           
  Misses       1126     1126           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@armanddidierjean armanddidierjean changed the title Format and imporve Alembic migration generation Format and improve Alembic migration generation Apr 5, 2024
@armanddidierjean armanddidierjean added the enhancement New feature or request label Apr 5, 2024
@armanddidierjean armanddidierjean marked this pull request as ready for review April 5, 2024 17:01
Copy link
Contributor

@julien4215 julien4215 left a comment

Choose a reason for hiding this comment

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

Maybe we could add a comment in the datetime.py file to explain that if we change the custom type then it might break the existing migrations.

@armanddidierjean armanddidierjean merged commit c82323c into main Apr 19, 2024
9 checks passed
@armanddidierjean armanddidierjean deleted the alembic-generation branch April 19, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request migration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants