Versions in this module Expand all Collapse all v0 v0.9.0 Aug 18, 2026 Changes in this version + const DriverName + var ErrEmptySchemaName = errors.New("schema name is empty") + var ErrNoPublicTables = errors.New("no public tables to migrate") + var ErrNoTenantTables = errors.New("no tenant tables to migrate") + func CurrentSearchPath(tx *gorm.DB) string + func DropSchemaForTenant(db *gorm.DB, schemaName string) error + func MigratePublicSchema(db *gorm.DB) error + func MigrateTenantModels(db *gorm.DB, schemaName string) error + func New(config Config, opts ...Option) gorm.Dialector + func RegisterModels(db *gorm.DB, models ...driver.TenantTabler) error + func SetSearchPath(tx *gorm.DB, schemaName string) (reset func() error, err error) + type Config struct + type Dialector struct + func (dialector *Dialector) RegisterModels(models ...driver.TenantTabler) error + func (dialector Dialector) Migrator(db *gorm.DB) gorm.Migrator + type Migrator struct + func (m Migrator) AutoMigrate(values ...any) error + func (m Migrator) DropSchemaForTenant(tenant string) error + func (m Migrator) MigrateSharedModels() error + func (m Migrator) MigrateTenantModels(tenantID string) error + type Option func(*Options) + type Options struct + DisableRetry bool + MaxInterval time.Duration + MaxRetries uint + RetryDelay time.Duration