feat(schema): add database schema config#1129
feat(schema): add database schema config#1129serrovsky wants to merge 6 commits intoaquasecurity:mainfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1129 +/- ##
==========================================
- Coverage 63.86% 63.26% -0.61%
==========================================
Files 12 12
Lines 1882 1900 +18
==========================================
Hits 1202 1202
- Misses 619 637 +18
Partials 61 61
Continue to review full report at Codecov.
|
|
@luis-serra-ki Thanks for your contribution! |
Co-authored-by: Huang Huang <mozillazg101@gmail.com>
| if value := viper.GetString("PGSQL_SCHEMA"); value != "" { | ||
| schema = value | ||
| } else { | ||
| schema = "" | ||
| glog.V(2).Info("No schema set.") | ||
| } |
There was a problem hiding this comment.
| if value := viper.GetString("PGSQL_SCHEMA"); value != "" { | |
| schema = value | |
| } else { | |
| schema = "" | |
| glog.V(2).Info("No schema set.") | |
| } | |
| schema = viper.GetString("PGSQL_SCHEMA") |
| db, err := gorm.Open(postgres.Open(PsqlConnInfo.toString()), &gorm.Config{}) | ||
| var db *gorm.DB | ||
|
|
||
| if PsqlConnInfo.Schema == "" { |
There was a problem hiding this comment.
| if PsqlConnInfo.Schema == "" { | |
| if PsqlConnInfo.Schema == "" { | |
| glog.V(2).Info("No schema set.") |
|
@luis-serra-ki thank you for the contribution , added a couple of comments |
|
@serrovsky-pt Could you please take a look at these new comments? Thanks! |
|
luisserra seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
With this configuration, you can select database schema. This setting could be good when you want to share the same Postgres instance for different clusters validations.