Open liyang0918 opened 4 months ago
这个方案旨在降低Gorm使用的潜在风险,以及对数据库管理的规范化,希望作者能一起讨论 @jinzhu
AutoMigration is more recommended for quick testing in a development environment. Additionally, we have organized migration-related documentation here https://gorm.io/docs/migration.html . Feel free to refer to or update the relevant information.
Describe the feature
The proposed feature involves refactoring the AutoMigrate capability in GORM to operate as an advanced, optional module instead of being a core integrated function. This change would allow developers to import and utilize the AutoMigrate feature selectively, similar to how database drivers are included, providing a more controlled and intentional approach to database schema evolution.
Motivation
The motivation stems from several key considerations:
Related Issues
This suggestion aims to address the broader topic of database migration strategies within ORM usage and does not directly link to a specific open issue. However, it is relevant to discussions around best practices in ORM design, version control for database schemas, and the balance between developer convenience and system stability.
对于母语为汉语的我来说,可能用中文更适合描述我的问题和担忧:
尊敬的GORM团队,
首先,感谢你们为Go社区提供了如此强大且易用的ORM工具。我在此提出一项建议,旨在进一步增强GORM的灵活性和对数据库管理最佳实践的支持。
问题背景:
改进建议:
理由:
我相信,通过上述改进,GORM不仅能够维持其易用性,还能在促进更专业、更安全的数据库管理实践中发挥重要作用。期待您们的考虑,并感谢您们对Go生态的持续贡献。