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

Permify / permify / 12824798363

17 Jan 2025 07:45AM UTC coverage: 79.935% (+0.02%) from 79.916%
12824798363

push

github

web-flow
Merge pull request #1918 from Permify/dependabot/maven/sdk/java/grpc/io.grpc-grpc-core-1.69.1

build(deps): bump io.grpc:grpc-core from 1.69.0 to 1.69.1 in /sdk/java/grpc

8167 of 10217 relevant lines covered (79.94%)

120.13 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