Created
October 3, 2013 18:25
-
-
Save duk3luk3/6814590 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE ROLE mailboxer; | |
ALTER ROLE mailboxer WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB LOGIN NOREPLICATION PASSWORD 'md5xxx'; | |
CREATE ROLE postgres; | |
ALTER ROLE postgres WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN REPLICATION PASSWORD 'md5xxx'; | |
-- | |
-- Database creation | |
-- | |
CREATE DATABASE mail WITH TEMPLATE = template0 OWNER = mailboxer; | |
REVOKE ALL ON DATABASE template1 FROM PUBLIC; | |
REVOKE ALL ON DATABASE template1 FROM postgres; | |
GRANT ALL ON DATABASE template1 TO postgres; | |
GRANT CONNECT ON DATABASE template1 TO PUBLIC; | |
\connect mail | |
-- | |
-- PostgreSQL database dump | |
-- | |
SET statement_timeout = 0; | |
SET client_encoding = 'UTF8'; | |
SET standard_conforming_strings = on; | |
SET check_function_bodies = false; | |
SET client_min_messages = warning; | |
SET search_path = public, pg_catalog; | |
SET default_tablespace = ''; | |
SET default_with_oids = false; | |
-- | |
-- Name: aliases; Type: TABLE; Schema: public; Owner: mailboxer; Tablespace: | |
-- | |
CREATE TABLE aliases ( | |
alias text NOT NULL, | |
email text NOT NULL | |
); | |
ALTER TABLE public.aliases OWNER TO mailboxer; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment