Documentation ¶
Index ¶
- type MigrationCmd
- func (mc *MigrationCmd) AddMigration(m ...*gormigrate.Migration)
- func (mc *MigrationCmd) AddSeed(sf ...seed.SeedFunc)
- func (mc *MigrationCmd) Migrate() error
- func (mc *MigrationCmd) MigrationLen() int
- func (mc *MigrationCmd) Refresh() error
- func (mc *MigrationCmd) Rollback(migrationId string) error
- func (mc *MigrationCmd) Seed() error
- func (mc *MigrationCmd) SeedlLen() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MigrationCmd ¶
type MigrationCmd struct { MigrationCollection []*gormigrate.Migration SeedCollection []seed.SeedFunc }
MigrationCmd 迁移 cmd MigrationCollection 迁移集合,数据表迁移方法 SeedCollection 数据填充集合
func (*MigrationCmd) AddMigration ¶
func (mc *MigrationCmd) AddMigration(m ...*gormigrate.Migration)
AddMigration 添加 *gormigrate.Migration
func (*MigrationCmd) MigrationLen ¶
func (mc *MigrationCmd) MigrationLen() int
MigrationLen MigrationCollection 的长度
func (*MigrationCmd) Rollback ¶
func (mc *MigrationCmd) Rollback(migrationId string) error
Rollback 回滚迁移到
Click to show internal directories.
Click to hide internal directories.