Skip to content

Commit d08c3c7

Browse files
authored
feat: support oriole 17 experimental image (#4053)
2 parents f9b3bd2 + d684dbc commit d08c3c7

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

internal/db/start/start.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func NewContainerConfig(args ...string) container.Config {
7373
}
7474
if len(utils.Config.Experimental.OrioleDBVersion) > 0 {
7575
env = append(env,
76-
"POSTGRES_INITDB_ARGS=--lc-collate=C",
76+
"POSTGRES_INITDB_ARGS=--lc-collate=C --lc-ctype=C",
7777
fmt.Sprintf("S3_ENABLED=%t", true),
7878
"S3_HOST="+utils.Config.Experimental.S3Host,
7979
"S3_REGION="+utils.Config.Experimental.S3Region,

pkg/config/config.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -763,11 +763,14 @@ func (c *config) Validate(fsys fs.FS) error {
763763
return errors.New("Missing required field in config: db.major_version")
764764
case 12:
765765
return errors.New("Postgres version 12.x is unsupported. To use the CLI, either start a new project or follow project migration steps here: https://supabase.com/docs/guides/database#migrating-between-projects.")
766-
case 13, 14, 17:
767-
// TODO: support oriole db 17 eventually
768-
case 15:
766+
case 13, 14:
767+
case 15, 17:
769768
if len(c.Experimental.OrioleDBVersion) > 0 {
770-
c.Db.Image = "supabase/postgres:orioledb-" + c.Experimental.OrioleDBVersion
769+
if VersionCompare(c.Experimental.OrioleDBVersion, "15.1.1.13") > 0 {
770+
c.Db.Image = fmt.Sprintf("supabase/postgres:%s-orioledb", c.Experimental.OrioleDBVersion)
771+
} else {
772+
c.Db.Image = "supabase/postgres:orioledb-" + c.Experimental.OrioleDBVersion
773+
}
771774
if err := assertEnvLoaded(c.Experimental.S3Host); err != nil {
772775
return err
773776
}

0 commit comments

Comments
 (0)