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

Permify / permify / 10869096450

15 Sep 2024 07:18AM UTC coverage: 79.711% (+0.02%) from 79.691%
10869096450

push

github

web-flow
Merge pull request #1584 from Permify/dependabot/go_modules/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc-0.55.0

build(deps): bump go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc from 0.54.0 to 0.55.0

8054 of 10104 relevant lines covered (79.71%)

113.9 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