Versions in this module Expand all Collapse all v4 v4.0.0 Feb 19, 2024 Changes in this version + const PublicSchemaName + func CreateSchemaForTenant(db *gorm.DB, schemaName string) error + func DropSchemaForTenant(db *gorm.DB, schemaName string) error + func MigratePublicSchema(db *gorm.DB) error + func New(config Config, models ...interface{}) gorm.Dialector + func Open(dsn string, models ...interface{}) gorm.Dialector + func RegisterModels(db *gorm.DB, models ...interface{}) error + type Config = postgres.Config + type Dialector struct + func (dialector Dialector) Migrator(db *gorm.DB) gorm.Migrator + type Migrator struct + func (m *Migrator) CreateSchemaForTenant(tenant string) error + func (m *Migrator) DropSchemaForTenant(tenant string) error + func (m *Migrator) MigratePublicSchema() error + func (m Migrator) AutoMigrate(values ...interface{}) error + type MultitenancyMigrator interface + CreateSchemaForTenant func(tenant string) error + DropSchemaForTenant func(tenant string) error + MigratePublicSchema func() error + type TenantModel struct + DomainURL string + SchemaName string Other modules containing this package github.com/bartventer/gorm-multitenancy github.com/bartventer/gorm-multitenancy/drivers/postgres/v7 github.com/bartventer/gorm-multitenancy/v2 github.com/bartventer/gorm-multitenancy/v3 github.com/bartventer/gorm-multitenancy/v5 github.com/bartventer/gorm-multitenancy/v6