brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorbett <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: add the creation of default datab...
Date Tue, 18 Aug 2015 09:27:51 GMT
Github user sjcorbett commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/832#discussion_r37279897
  
    --- Diff: software/database/src/main/java/brooklyn/entity/database/postgresql/PostgreSqlSshDriver.java
---
    @@ -294,7 +296,25 @@ public void customize() {
     
             // Wait for commands to complete before running the creation script
             DynamicTasks.waitForLast();
    -
    +        String createUserCommand = String.format(
    +                "\"CREATE USER %s WITH PASSWORD '%s'; \"",
    +                StringEscapes.escapeSql(entity.getConfig(PostgreSqlNode.USERNAME)), 
    +                StringEscapes.escapeSql(getUserPassword())
    +        );
    +        String createDatabaseCommand = String.format(
    +                "\"CREATE DATABASE %s OWNER %s\"",
    +                StringEscapes.escapeSql(entity.getConfig(PostgreSqlNode.DATABASE)),
    +                StringEscapes.escapeSql(entity.getConfig(PostgreSqlNode.USERNAME)));
    +        newScript("initializing user and database")
    --- End diff --
    
    This should be optional.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message