cobramigration

package
v0.0.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package cobramigration: Cobra CLI integration for database migration operations Provides command-line interface for migration execution with user-friendly commands Features version display, batch migration, and step-by-step migration control Integrates seamlessly with golang-migrate for robust migration management

cobramigration: 用于数据库迁移操作的 Cobra CLI 集成 为迁移执行提供命令行接口,具有用户友好的命令 具有版本显示、批量迁移和逐步迁移控制功能 与 golang-migrate 无缝集成,提供稳健的迁移管理

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMigrateCmd

func NewMigrateCmd(param *migrationparam.MigrationParam) *cobra.Command

NewMigrateCmd creates comprehensive migration command with subcommands for all migration operations Uses lazy initialization - connections created only when command runs (not during command tree building) Migration connection interface ensures proper resource cleanup after operations

NewMigrateCmd 创建包含子命令的综合迁移命令,用于所有迁移操作 使用延迟初始化 - 仅在命令运行时创建连接(而非命令树构建时) 迁移连接接口确保操作后正确清理资源

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL