Skip to content

Commit

Permalink
feat(postgres): Admin username in Azure is not equal to the role name (
Browse files Browse the repository at this point in the history
…#1)

* feat(postgres): Admin username in Azure is not equal to the role name to revoke

Signed-off-by: Thor Anker Kvisgård Lange <tal@netic.dk>

* feat: Adjust build to publish containers to ghcr

* chore: Upgrade golangci-lint

* fix: Re-adding timeout

---------

Signed-off-by: Thor Anker Kvisgård Lange <tal@netic.dk>
  • Loading branch information
langecode authored Mar 6, 2023
1 parent 77b211b commit 4b10eb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/utils/database/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func (p Postgres) checkSchemas() error {
}

func (p Postgres) deleteDatabase(admin AdminCredentials) error {
revoke := fmt.Sprintf("REVOKE CONNECT ON DATABASE \"%s\" FROM PUBLIC, \"%s\";", p.Database, admin.Username)
revoke := fmt.Sprintf("REVOKE CONNECT ON DATABASE \"%s\" FROM PUBLIC;", p.Database)
delete := fmt.Sprintf("DROP DATABASE \"%s\";", p.Database)

if p.isDbExist(admin) {
Expand Down

0 comments on commit 4b10eb3

Please sign in to comment.