text: --
  -- PostgreSQL database dump
  --
  
  -- Dumped from database version 9.6.5
  -- Dumped by pg_dump version 9.6.5
  
  SET statement_timeout = 0;
  SET lock_timeout = 0;
  SET idle_in_transaction_session_timeout = 0;
  SET client_encoding = 'UTF8';
  SET standard_conforming_strings = on;
  SET check_function_bodies = false;
  SET client_min_messages = warning;
  SET row_security = off;
  
  --
  -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
  --
  
  CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
  
  
  --
  -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
  --
  
  COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
  
  
  SET search_path = public, pg_catalog;
  
  SET default_tablespace = '';
  
  SET default_with_oids = false;
  
  --
  -- Name: authors; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE authors (
      id bigint NOT NULL,
      name character varying(255) NOT NULL,
      website_url character varying(255)
  );
  
  
  --
  -- Name: authors_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE authors_id_seq
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: authors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE authors_id_seq OWNED BY authors.id;
  
  
  --
  -- Name: posts; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE posts (
      id bigint NOT NULL,
      title character varying(255) NOT NULL,
      body text NOT NULL,
      published_on date,
      author_id bigint
  );
  
  
  --
  -- Name: posts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE posts_id_seq
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: posts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE posts_id_seq OWNED BY posts.id;
  
  
  --
  -- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE schema_migrations (
      version bigint NOT NULL,
      inserted_at timestamp without time zone
  );
  
  
  --
  -- Name: authors id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY authors ALTER COLUMN id SET DEFAULT nextval('authors_id_seq'::regclass);
  
  
  --
  -- Name: posts id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY posts ALTER COLUMN id SET DEFAULT nextval('posts_id_seq'::regclass);
  
  
  --
  -- Name: authors authors_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY authors
      ADD CONSTRAINT authors_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: posts posts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY posts
      ADD CONSTRAINT posts_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY schema_migrations
      ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);
  
  
  --
  -- Name: posts posts_author_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY posts
      ADD CONSTRAINT posts_author_id_fkey FOREIGN KEY (author_id) REFERENCES authors(id);
  
  
  --
  -- PostgreSQL database dump complete
  --
  
  INSERT INTO "schema_migrations" (version) VALUES (20180220220538);
  
  