Compare commits

..

No commits in common. "8bb232830770e5bfed642942e8b35f1be3e555d2" and "d69d1b68f68e57cde7bb2809aace18efe6e41d17" have entirely different histories.

3 changed files with 3 additions and 7 deletions

View File

@ -70,11 +70,9 @@ func Connect(ctx context.Context, config models.DatabaseConfig) error {
return utils.HandleError(ctx, span, localLogger, err) return utils.HandleError(ctx, span, localLogger, err)
} }
if config.Migrate { err = migrateDatabase(ctx, sqlDB, config)
err = migrateDatabase(ctx, sqlDB, config) if err != nil {
if err != nil { return utils.HandleError(ctx, span, localLogger, err)
return utils.HandleError(ctx, span, localLogger, err)
}
} }
client = sqlDB client = sqlDB

View File

@ -9,5 +9,4 @@ type DatabaseConfig struct {
SSL bool `env:"DB_SSL,required" envDefault:"true"` SSL bool `env:"DB_SSL,required" envDefault:"true"`
Timezone string `env:"DB_TIMEZONE,required" envDefault:"Europe/Berlin"` Timezone string `env:"DB_TIMEZONE,required" envDefault:"Europe/Berlin"`
Debug bool `env:"DB_DEBUG" envDefault:"false"` Debug bool `env:"DB_DEBUG" envDefault:"false"`
Migrate bool
} }

View File

@ -121,7 +121,6 @@ func DatabaseModesFromConnectionString(ctx context.Context, pgContainer *postgre
SSL: false, SSL: false,
Timezone: "Europe/Berlin", Timezone: "Europe/Berlin",
Debug: true, Debug: true,
Migrate: true,
} }
return databaseConfig, nil return databaseConfig, nil