Skip to content

Commit

Permalink
fix: use migration database connection when installing timescale exte…
Browse files Browse the repository at this point in the history
…nsion (#304)
  • Loading branch information
iand authored Dec 8, 2020
1 parent 1410a49 commit a1118f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (d *Database) MigrateSchemaTo(ctx context.Context, target int) error {
// migration), so we run it explicitally here and only when setting
// things up for the first time (#179).
if dbVersion == 0 {
if _, err := d.DB.Exec(`CREATE EXTENSION IF NOT EXISTS timescaledb WITH SCHEMA public`); err != nil {
if _, err := db.Exec(`CREATE EXTENSION IF NOT EXISTS timescaledb WITH SCHEMA public`); err != nil {
return xerrors.Errorf("creating timescaledb extension: %w", err)
}
}
Expand Down

0 comments on commit a1118f0

Please sign in to comment.