BREAKING CHANGE: V2 of thr SDK #12

Merged
fenpaws merged 124 commits from develop/postgresql into main 2024-07-01 20:46:28 +00:00
Showing only changes of commit f0bd89759c - Show all commits

View File

@ -38,11 +38,15 @@ func (p postgresqlConnection) Connect(ctx context.Context, endpoint string, user
return err return err
} }
log.Infof("OtterSpace: migration compleate")
p.db, err = gorm.Open(gormPostgres.Open(dsn), &gorm.Config{}) p.db, err = gorm.Open(gormPostgres.Open(dsn), &gorm.Config{})
if err != nil { if err != nil {
return err return err
} }
log.Infof("OtterSpace: postgres connection established")
return nil return nil
fenpaws marked this conversation as resolved Outdated

Set this LogLevel depending on DEBUG or not in config

Set this LogLevel depending on DEBUG or not in config
} }
@ -159,10 +163,10 @@ func (p postgresqlConnection) migrateDatabase(connectionString string) error {
return fmt.Errorf("postgres migration: %v", err) return fmt.Errorf("postgres migration: %v", err)
} }
if n != 0 { if n != 0 {
log.Infof("postgres migration: applied %d migrations!", n) log.Tracef("postgres migration: applied %d migrations!", n)
} else { } else {
log.Info("postgres migration: nothing to migrate") log.Trace("postgres migration: nothing to migrate")
} }