diff --git a/postgres/Cargo.toml b/postgres/Cargo.toml index 3269eda..42a7fa5 100644 --- a/postgres/Cargo.toml +++ b/postgres/Cargo.toml @@ -1,17 +1,13 @@ [package] -authors = [ - "Tsiry Sandratraina ", -] +authors = ["Tsiry Sandratraina "] 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" diff --git a/postgres/fluentci.toml b/postgres/fluentci.toml index f7ddf74..b57369b 100644 --- a/postgres/fluentci.toml +++ b/postgres/fluentci.toml @@ -1,11 +1,7 @@ [package] -authors = [ - "Tsiry Sandratraina ", -] +authors = ["Tsiry Sandratraina "] description = "Postgres Plugin for FluentCI" -keywords = [ - "postgres", -] +keywords = ["postgres"] license = "MIT" name = "postgres" -version = "0.1.5" +version = "0.1.6" diff --git a/postgres/src/lib.rs b/postgres/src/lib.rs index 8eb63a5..0868b7c 100644 --- a/postgres/src/lib.rs +++ b/postgres/src/lib.rs @@ -50,6 +50,7 @@ pub fn start(_args: String) -> FnResult { .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)