Versions in this module Expand all Collapse all v0 v0.19.4 Nov 1, 2026 Changes in this version + func QuickAutoMigrate(db *gorm.DB, config *MigratorConfig) error + func QuickMigrate(db *gorm.DB, models ...interface{}) error + type ClickHouseTableDefinition struct + ColumnOverrides map[string]string + Columns string + Comment string + Model interface{} + OrderBy string + PartitionBy string + TTL string + TableName string + type ColumnComment struct + Column string + Comment string + Table string + Type string + type GormHandler struct + func (h *GormHandler) GetDB() *gorm.DB + func (h *GormHandler) IsConnected() bool + type Handler interface + GetDB func() *gorm.DB + IsConnected func() bool + func MustNewGormHandler(db *gorm.DB) Handler + func NewGormHandler(db *gorm.DB) (Handler, error) + type IndexDefinition struct + ClickHouseGranularity int + ClickHouseType string + Columns string + Name string + Storing []string + Table string + Unique bool + Where string + func NewIndex(table string, columns ...string) IndexDefinition + func NewIndexDesc(table string, columns ...string) IndexDefinition + func NewIndexWithName(table, name, columns string, unique bool) IndexDefinition + func NewUniqueIndex(table string, columns ...string) IndexDefinition + func (idx *IndexDefinition) GenerateIndexName() string + func (idx IndexDefinition) WithStoring(columns ...string) IndexDefinition + func (idx IndexDefinition) WithWhere(condition string) IndexDefinition + type Migrator struct + func NewMigrator(db *gorm.DB, config *MigratorConfig) *Migrator + func (m *Migrator) AddComments() error + func (m *Migrator) AutoMigrate() error + func (m *Migrator) CheckTablesExist(tables ...string) map[string]bool + func (m *Migrator) CheckTablesExistWithModels(models ...interface{}) map[string]bool + func (m *Migrator) CreateIndexes() error + func (m *Migrator) DropTables(tables ...string) error + func (m *Migrator) DropTablesWithModels(models ...interface{}) error + func (m *Migrator) GetTableName(model interface{}) string + func (m *Migrator) HasTable(table string) bool + func (m *Migrator) HasTableWithModel(model interface{}) bool + func (m *Migrator) MigrateMergeTreeTables() error + func (m *Migrator) MigrateModels() error + func (m *Migrator) SyncColumnComments(models ...interface{}) error + func (m *Migrator) SyncColumnCommentsWithModels() error + type MigratorConfig struct + Comments []TableComment + Indexes []IndexDefinition + Logger logger.ILogger + MergeTreeTables []ClickHouseTableDefinition + Models []interface{} + SkipCommentOnError bool + SkipIndexOnError bool + SkipMergeTreeOnError bool + type TableComment struct + Comment string + Table string