Add PGVersionsDesc for ordered PostgreSQL version selection

This commit is contained in:
Luis Eduardo
2025-09-27 17:05:06 +00:00
parent 0af1d7f141
commit 3453ccb355
2 changed files with 3 additions and 2 deletions

View File

@@ -60,7 +60,8 @@ var (
PSQL: "/usr/lib/postgresql/18/bin/psql",
}}
PGVersions = []PGVersion{PG13, PG14, PG15, PG16, PG17, PG18}
PGVersions = []PGVersion{PG13, PG14, PG15, PG16, PG17, PG18}
PGVersionsDesc = []PGVersion{PG18, PG17, PG16, PG15, PG14, PG13}
)
type Client struct{}

View File

@@ -9,7 +9,7 @@ import (
func PGVersionSelectOptions(selectedVersion sql.NullString) nodx.Node {
return nodx.Map(
postgres.PGVersions,
postgres.PGVersionsDesc,
func(pgVersion postgres.PGVersion) nodx.Node {
return nodx.Option(
nodx.Value(pgVersion.Value.Version),