//--------------------------------------------------------------------------
// SetpUP inicial DO banco de dados. Este script deve rodar antes
// de aplicarmos AS mudanças via liquibase.
//
// @autor Diego Pacheco
// @version 1.0
// @since 02/08/2009
//--------------------------------------------------------------------------

CREATE ROLE m2liquibase LOGIN
  ENCRYPTED PASSWORD 'md56e7ae817b181fe78f6f7bdab8cfdc236'
  NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE;

CREATE DATABASE liquibase
  WITH OWNER = m2liquibase
       ENCODING = 'UTF8'
       LC_COLLATE = 'Portuguese_Brazil.1252'
       LC_CTYPE = 'Portuguese_Brazil.1252'
       CONNECTION LIMIT = -1;
GRANT ALL ON DATABASE liquibase TO public;
GRANT ALL ON DATABASE liquibase TO m2liquibase;


CREATE ROLE m2liquibasediff LOGIN
  ENCRYPTED PASSWORD 'md54a95696426bfd75ee783033c857de2d4'
  NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE;

 CREATE DATABASE liquibasediff
  WITH OWNER = m2liquibasediff
       ENCODING = 'UTF8'
       LC_COLLATE = 'Portuguese_Brazil.1252'
       LC_CTYPE = 'Portuguese_Brazil.1252'
       CONNECTION LIMIT = -1;
GRANT ALL ON DATABASE liquibasediff TO public;
GRANT ALL ON DATABASE liquibasediff TO m2liquibasediff;