feat: optimize for migration versions#28787
feat: optimize for migration versions#28787asukaminato0721 merged 11 commits intolanggenius:mainfrom
Conversation
Summary of ChangesHello @longbingljw, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on refactoring database migration scripts to eliminate conditional logic based on the database dialect (PostgreSQL vs. MySQL). By standardizing column type definitions and removing database-specific checks, the changes aim to make the migration files cleaner, more concise, and easier to manage, particularly when adapting to different database systems like MySQL. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request is a great refactoring effort to simplify the database migration files. By removing dialect-specific conditional logic (for PostgreSQL vs. MySQL) and using custom SQLAlchemy types (models.types.LongText, models.types.StringUUID, etc.), the migration scripts have become much cleaner, more readable, and easier to maintain. The changes are consistent across all modified files and correctly apply the intended abstraction. This significantly improves the codebase's portability and reduces redundancy. I've reviewed the changes and they look solid. Well done!
| I will create a new pr to add seekdb logic in vector store and adapt for mysql |
Important
Fixes #<issue number>.Summary
I want to simplify the modification of migration version files when adapting to MySQL.In the past, when I adapted the code for MySQL, I used conditional statements to ensure the PostgreSQL parts remained unaffected. However, we can actually reduce some of these conditionals to optimize the code.
close #28455
close #26422
Screenshots
Checklist
dev/reformat(backend) andcd web && npx lint-staged(frontend) to appease the lint gods