• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Permify / permify / 11803394053

12 Nov 2024 06:23PM UTC coverage: 79.994% (-0.02%) from 80.014%
11803394053

push

github

web-flow
Merge pull request #1780 from Permify/dependabot/go_modules/go.opentelemetry.io/otel/exporters/zipkin-1.32.0

build(deps): bump go.opentelemetry.io/otel/exporters/zipkin from 1.31.0 to 1.32.0

8169 of 10212 relevant lines covered (79.99%)

121.04 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/internal/storage/postgres/utils/version.go
1
package utils
2

3
import (
4
        "context"
5
        "fmt"
6
        "strconv"
7

8
        "github.com/jackc/pgx/v5/pgxpool"
9
)
10

11
const (
12
        // The earliest supported version of PostgreSQL is 13.8
13
        earliestPostgresVersion = 130008
14
)
15

16
// EnsureDBVersion checks the version of the given database connection and returns an error if the version is not
17
// supported.
18
func EnsureDBVersion(db *pgxpool.Pool) (version string, err error) {
×
19
        err = db.QueryRow(context.Background(), "SHOW server_version_num;").Scan(&version)
×
20
        if err != nil {
×
21
                return
×
22
        }
×
23
        v, err := strconv.Atoi(version)
×
24
        if v < earliestPostgresVersion {
×
25
                err = fmt.Errorf("unsupported postgres version: %s, expected >= %d", version, earliestPostgresVersion)
×
26
        }
×
27
        return
×
28
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc