Ejemplo n.º 1
0
 def create_database(self):
     # Create a postgresql database.
     postgresql_database_ensure(
         self.database_name,
         owner=self.database_user,
         encoding='UTF8',
         template='template0',
         locale='en_US.UTF-8'
     )
Ejemplo n.º 2
0
def setup_databases():

    # create production postgres database and test database
    # needs to match local_settings.py deployment values

    postgresql_role_ensure(env.deploy_user, env.password, superuser=True, createdb=True, createrole=True,
                           inherit=True, login=True)

    postgresql_database_ensure('urbanfootprint', owner=env.deploy_user, template='template_postgis')
Ejemplo n.º 3
0
    def create_database(self):
        # Create a postgresql database.
        postgresql_database_ensure(
            self.database_name,
            owner=self.database_user,
            encoding='UTF8',
            template='template0',
            locale='en_US.UTF-8'
        )

        if self.deploy_postgis:
            self.setup_postgis_for_database()
Ejemplo n.º 4
0
def ensure_database(db_name, owner):
    # owner should == what you used in ensure_role
    postgresql_database_ensure(db_name, owner=owner, encoding="UTF8")
Ejemplo n.º 5
0
def ensure_database(db_name, owner):
    # owner should == what you used in ensure_role
    postgresql_database_ensure(db_name, owner=owner, encoding="UTF8")