mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-04 23:45:07 +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)
|
||||
- [OpenID Connect certified](https://openid.net/certification/#OPs)
|
||||
- 🚧 [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).
|
||||
|
||||
|
@ -17,7 +17,7 @@ func newDatabase() *cobra.Command {
|
||||
Long: `Sets up the ZITADEL database.
|
||||
|
||||
Prereqesits:
|
||||
- cockroachdb
|
||||
- cockroachDB or postgreSQL
|
||||
|
||||
The user provided by flags needs priviledge to
|
||||
- create the database if it does not exist
|
||||
|
@ -17,7 +17,7 @@ func newGrant() *cobra.Command {
|
||||
Long: `Sets ALL grant to the database user.
|
||||
|
||||
Prereqesits:
|
||||
- cockroachdb
|
||||
- cockroachDB or postgreSQL
|
||||
`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
config := MustNewConfig(viper.New())
|
||||
|
@ -17,7 +17,7 @@ func newUser() *cobra.Command {
|
||||
Long: `Sets up the ZITADEL database user.
|
||||
|
||||
Prereqesits:
|
||||
- cockroachdb
|
||||
- cockroachDB or postreSQL
|
||||
|
||||
The user provided by flags needs priviledge to
|
||||
- create the database if it does not exist
|
||||
|
@ -12,15 +12,6 @@ import (
|
||||
"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 {
|
||||
return &cobra.Command{
|
||||
Use: "zitadel",
|
||||
@ -28,11 +19,12 @@ func newZitadel() *cobra.Command {
|
||||
Long: `initialize ZITADEL internals.
|
||||
|
||||
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())
|
||||
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 {
|
||||
return nil
|
||||
return err
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
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.
|
||||
:::
|
||||
|
||||
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:
|
||||
```yaml
|
||||
|
Loading…
Reference in New Issue
Block a user