mirror of
https://github.com/zitadel/zitadel.git
synced 2025-06-20 17:58:33 +00:00
fix: postgreSQL version spec (#4301)
* fix(cli): log error in `init zitadel` * docs: specify postgres version Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
parent
279b487961
commit
8a5c3b0fa1
@ -81,7 +81,7 @@ It's free for up to 25'000 authenticated requests. Learn more about the [pay-as-
|
|||||||
- [Service Accounts](https://docs.zitadel.com/docs/guides/integrate/serviceusers)
|
- [Service Accounts](https://docs.zitadel.com/docs/guides/integrate/serviceusers)
|
||||||
- [OpenID Connect certified](https://openid.net/certification/#OPs)
|
- [OpenID Connect certified](https://openid.net/certification/#OPs)
|
||||||
- 🚧 [SAML 2.0](https://github.com/zitadel/zitadel/pull/3618)
|
- 🚧 [SAML 2.0](https://github.com/zitadel/zitadel/pull/3618)
|
||||||
- [Postgres](https://docs.zitadel.com/docs/guides/manage/self-hosted/database#postgres) or [CockroachDB](https://docs.zitadel.com/docs/guides/manage/self-hosted/database#cockroach)
|
- [Postgres](https://docs.zitadel.com/docs/guides/manage/self-hosted/database#postgres) (version >= 14) or [CockroachDB](https://docs.zitadel.com/docs/guides/manage/self-hosted/database#cockroach) (version >= 22.0)
|
||||||
|
|
||||||
Track upcoming features on our [roadmap](https://zitadel.com/roadmap).
|
Track upcoming features on our [roadmap](https://zitadel.com/roadmap).
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ func newDatabase() *cobra.Command {
|
|||||||
Long: `Sets up the ZITADEL database.
|
Long: `Sets up the ZITADEL database.
|
||||||
|
|
||||||
Prereqesits:
|
Prereqesits:
|
||||||
- cockroachdb
|
- cockroachDB or postgreSQL
|
||||||
|
|
||||||
The user provided by flags needs priviledge to
|
The user provided by flags needs priviledge to
|
||||||
- create the database if it does not exist
|
- create the database if it does not exist
|
||||||
|
@ -17,7 +17,7 @@ func newGrant() *cobra.Command {
|
|||||||
Long: `Sets ALL grant to the database user.
|
Long: `Sets ALL grant to the database user.
|
||||||
|
|
||||||
Prereqesits:
|
Prereqesits:
|
||||||
- cockroachdb
|
- cockroachDB or postgreSQL
|
||||||
`,
|
`,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
config := MustNewConfig(viper.New())
|
config := MustNewConfig(viper.New())
|
||||||
|
@ -17,7 +17,7 @@ func newUser() *cobra.Command {
|
|||||||
Long: `Sets up the ZITADEL database user.
|
Long: `Sets up the ZITADEL database user.
|
||||||
|
|
||||||
Prereqesits:
|
Prereqesits:
|
||||||
- cockroachdb
|
- cockroachDB or postreSQL
|
||||||
|
|
||||||
The user provided by flags needs priviledge to
|
The user provided by flags needs priviledge to
|
||||||
- create the database if it does not exist
|
- create the database if it does not exist
|
||||||
|
@ -12,15 +12,6 @@ import (
|
|||||||
"github.com/zitadel/zitadel/internal/database"
|
"github.com/zitadel/zitadel/internal/database"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
|
||||||
eventstoreSchema = "eventstore"
|
|
||||||
eventsTable = "events"
|
|
||||||
uniqueConstraintsTable = "unique_constraints"
|
|
||||||
projectionsSchema = "projections"
|
|
||||||
systemSchema = "system"
|
|
||||||
encryptionKeysTable = "encryption_keys"
|
|
||||||
)
|
|
||||||
|
|
||||||
func newZitadel() *cobra.Command {
|
func newZitadel() *cobra.Command {
|
||||||
return &cobra.Command{
|
return &cobra.Command{
|
||||||
Use: "zitadel",
|
Use: "zitadel",
|
||||||
@ -28,11 +19,12 @@ func newZitadel() *cobra.Command {
|
|||||||
Long: `initialize ZITADEL internals.
|
Long: `initialize ZITADEL internals.
|
||||||
|
|
||||||
Prereqesits:
|
Prereqesits:
|
||||||
- cockroachdb with user and database
|
- cockroachDB or postgreSQL with user and database
|
||||||
`,
|
`,
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
config := MustNewConfig(viper.GetViper())
|
config := MustNewConfig(viper.GetViper())
|
||||||
return verifyZitadel(config.Database)
|
err := verifyZitadel(config.Database)
|
||||||
|
logging.OnError(err).Fatal("unable to init zitadel")
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -82,7 +74,7 @@ func verifyZitadel(config database.Config) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if err := VerifyZitadel(db, config); err != nil {
|
if err := VerifyZitadel(db, config); err != nil {
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return db.Close()
|
return db.Close()
|
||||||
|
@ -144,4 +144,4 @@ The storage layer of ZITADEL is responsible for multiple things. For example:
|
|||||||
- Backup and restore operation for disaster recovery purpose
|
- Backup and restore operation for disaster recovery purpose
|
||||||
|
|
||||||
ZITADEL currently supports CockroachDB as first choice of storage due to its perfect match for ZITADELs needs.
|
ZITADEL currently supports CockroachDB as first choice of storage due to its perfect match for ZITADELs needs.
|
||||||
Postgresql support is currently in beta.
|
PostgreSQL support is currently in beta.
|
||||||
|
@ -4,7 +4,9 @@
|
|||||||
Postgres extension is currently in beta.
|
Postgres extension is currently in beta.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
If you want to use a Postgres database instead of CockroachDB you can [overwrite the default configuration](../configure/configure.mdx).
|
If you want to use a PostgreSQL database instead of CockroachDB you can [overwrite the default configuration](../configure/configure.mdx).
|
||||||
|
|
||||||
|
Currently versions >= 14 are supported.
|
||||||
|
|
||||||
Postgres can be configured as follows:
|
Postgres can be configured as follows:
|
||||||
```yaml
|
```yaml
|
||||||
|
Loading…
x
Reference in New Issue
Block a user