au.net.causal.maven.plugins.boxdb.db.postgres-create-user.sql Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of boxdb-maven-plugin Show documentation
Show all versions of boxdb-maven-plugin Show documentation
Maven plugin to start databases using Docker and VMs
\set ON_ERROR_STOP 1
DO
$setupDb$
BEGIN
IF NOT EXISTS (SELECT * FROM pg_catalog.pg_user where usename = '${box.databaseUser}') THEN
CREATE USER ${box.databaseUser} PASSWORD '${box.databasePassword}';
ELSE
ALTER USER ${box.databaseUser} PASSWORD '${box.databasePassword}';
END IF;
END
$setupDb$