1
0
forked from baron/baron-sso

테넌트 등록 방식을 결정

This commit is contained in:
2026-02-02 14:05:50 +09:00
parent 9e9c622600
commit 5dd425050c
21 changed files with 613 additions and 84 deletions

View File

@@ -17,6 +17,11 @@ func Run(db *gorm.DB) error {
return fmt.Errorf("migration failed: %w", err)
}
// 2. Seed Tenants
if err := SeedTenants(db); err != nil {
return fmt.Errorf("tenant seeding failed: %w", err)
}
slog.Info("[Bootstrap] User seed skipped (Kratos is SoT)")
slog.Info("[Bootstrap] Bootstrap completed successfully.")
return nil
@@ -27,6 +32,8 @@ func migrateSchemas(db *gorm.DB) error {
// Add all domain models here
return db.AutoMigrate(
&domain.Tenant{},
&domain.TenantDomain{},
&domain.User{},
&domain.ApiKey{},
&domain.IdentityProviderConfig{},
// &domain.RelyingParty{}, // TODO: Uncomment when model is ready