Documentation
¶
Overview ¶
Package migrationparam: Database migration instance factory with multiple initialization strategies Provides flexible migration creation supporting file systems, embedded resources and database drivers
migrationparam: 数据库迁移实例工厂,支持多种初始化策略 提供灵活的迁移创建,支持文件系统、嵌入资源和数据库驱动
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDebugMode ¶
func GetDebugMode() bool
GetDebugMode returns the project-wide debug mode for migration operations GetDebugMode 获取项目级别的迁移操作调试模式
func SetDebugMode ¶
func SetDebugMode(enable bool)
SetDebugMode sets the project-wide debug mode for migration operations SetDebugMode 设置项目级别的迁移操作调试模式
Types ¶
type MigrationParam ¶
type MigrationParam struct {
// contains filtered or unexported fields
}
MigrationParam provides unified database connection and migration management Contains factory functions for creating connections and migrations on demand Cleanup method handles proper resource release after operations complete
MigrationParam 提供统一的数据库连接和迁移管理 包含按需创建连接和迁移的工厂函数 Cleanup 方法在操作完成后处理资源释放
func NewMigrationParam ¶
func (*MigrationParam) GetDB ¶
func (p *MigrationParam) GetDB() (*gorm.DB, func())
func (*MigrationParam) GetMigration ¶
func (p *MigrationParam) GetMigration() (*migrate.Migrate, func())