-
Notifications
You must be signed in to change notification settings - Fork 3
🐛 修复 postgresql 标识符大于63字符的错误 #545
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes issues with PostgreSQL identifiers exceeding 63 characters by updating dependency versions and refactoring migration scripts to use shorter, consistent naming and SQLAlchemy types. Key changes include:
- Adding the nonebot-plugin-orm dependency with PostgreSQL support.
- Refactoring migration scripts to replace sa.VARCHAR/INTEGER/DATETIME with their sa.String/Integer/DateTime counterparts and handling potential IdentifierError exceptions.
- Updating index names and column types (including switching from BLOB to PickleType for certain columns) to conform to identifier length limitations.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
pyproject.toml | Add dependency for nonebot-plugin-orm with PostgreSQL support. |
.../f5b4a6d1325b_tetr_io_new_season.py | Introduce IdentifierError handling for dropping indexes in tetriohistoricaldata. |
.../cfeab6961dce_extend_api_type_field_length.py | Update SQLAlchemy type usage and include an interactive prompt in the downgrade. |
.../b7fbdafc339a_add_user_unique_identifier_field_to_.py | Update SQLAlchemy type from VARCHAR to String for user_unique_identifier. |
.../b15844837693_migrate_to_nonobot_plugin_user.py | Update SQLAlchemy types for consistency in the bind table migration. |
.../9f6582279ce2_recreate_historical_data.py | Migrate column types and switch from BLOB to PickleType for storing pickled data. |
.../3c25a5a8c050_refactor_historical.py | Refactor historical data migration with IdentifierError exception handling and updated types. |
Comments suppressed due to low confidence (1)
nonebot_plugin_tetris_stats/config/migrations/cfeab6961dce_extend_api_type_field_length.py:44
- Using an interactive input prompt in a migration downgrade can cause issues in automated deployment environments. Consider removing the prompt or using a non-interactive confirmation mechanism.
input('如果确认可以迁移, 请按回车键继续!')
c1a567f
to
3e15f42
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
close #482