Skip to content

Commit

Permalink
fix(postgres): update database owner
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Aug 23, 2024
1 parent bec54c8 commit 2764811
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
10 changes: 3 additions & 7 deletions postgres/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
[package]
authors = [
"Tsiry Sandratraina <[email protected]>",
]
authors = ["Tsiry Sandratraina <[email protected]>"]
description = "Postgres plugin for FluentCI"
edition = "2021"
license = "MIT"
name = "postgres"
version = "0.1.5"
version = "0.1.6"

[lib]
crate-type = [
"cdylib",
]
crate-type = ["cdylib"]

[dependencies]
anyhow = "1.0.82"
Expand Down
10 changes: 3 additions & 7 deletions postgres/fluentci.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
[package]
authors = [
"Tsiry Sandratraina <[email protected]>",
]
authors = ["Tsiry Sandratraina <[email protected]>"]
description = "Postgres Plugin for FluentCI"
keywords = [
"postgres",
]
keywords = ["postgres"]
license = "MIT"
name = "postgres"
version = "0.1.5"
version = "0.1.6"
1 change: 1 addition & 0 deletions postgres/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ pub fn start(_args: String) -> FnResult<String> {
.with_exec(vec!["psql --host=localhost -d $POSTGRES_DB -U `whoami` -c \"GRANT ALL ON SCHEMA public TO $POSTGRES_USER;\""])?
.with_exec(vec!["psql --host=localhost -d $POSTGRES_DB -U `whoami` -c \"GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO $POSTGRES_USER;\""])?
.with_exec(vec!["psql --host=localhost -d $POSTGRES_DB -U `whoami` -c \"ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON TABLES TO $POSTGRES_USER;\""])?
.with_exec(vec!["psql --host=localhost -d $POSTGRES_DB -U `whoami` -c \"ALTER DATABASE $POSTGRES_DB OWNER TO $POSTGRES_USER;\""])?
.with_exec(vec!["overmind", "status"])?
.stdout()?;
Ok(stdout)
Expand Down

0 comments on commit 2764811

Please sign in to comment.