text: --
  -- PostgreSQL database dump
  --
  
  -- Dumped from database version 9.5.1
  -- Dumped by pg_dump version 9.5.2
  
  SET statement_timeout = 0;
  SET lock_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: ar_internal_metadata; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE ar_internal_metadata (
      key character varying NOT NULL,
      value character varying,
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL
  );
  
  
  --
  -- Name: comments; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE comments (
      id integer NOT NULL,
      content character varying,
      post_id integer,
      user_id integer,
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL
  );
  
  
  --
  -- Name: comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE comments_id_seq
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE comments_id_seq OWNED BY comments.id;
  
  
  --
  -- Name: post_follows; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE post_follows (
      id integer NOT NULL,
      post_id integer,
      user_id integer,
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL
  );
  
  
  --
  -- Name: post_follows_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE post_follows_id_seq
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: post_follows_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE post_follows_id_seq OWNED BY post_follows.id;
  
  
  --
  -- Name: posts; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE posts (
      id integer NOT NULL,
      title character varying,
      content text,
      meta_keywords character varying,
      meta_desc character varying,
      user_id integer,
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL,
      slug character varying,
      status integer
  );
  
  
  --
  -- 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 character varying NOT NULL
  );
  
  
  --
  -- Name: users; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE users (
      id integer NOT NULL,
      login character varying DEFAULT ''::character varying NOT NULL,
      email character varying DEFAULT ''::character varying NOT NULL,
      password_digest character varying DEFAULT ''::character varying NOT NULL,
      authentication_token character varying,
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL,
      role integer NOT NULL
  );
  
  
  --
  -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE users_id_seq
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE users_id_seq OWNED BY users.id;
  
  
  --
  -- Name: id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY comments ALTER COLUMN id SET DEFAULT nextval('comments_id_seq'::regclass);
  
  
  --
  -- Name: id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY post_follows ALTER COLUMN id SET DEFAULT nextval('post_follows_id_seq'::regclass);
  
  
  --
  -- Name: id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY posts ALTER COLUMN id SET DEFAULT nextval('posts_id_seq'::regclass);
  
  
  --
  -- Name: id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
  
  
  --
  -- Name: ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY ar_internal_metadata
      ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key);
  
  
  --
  -- Name: comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY comments
      ADD CONSTRAINT comments_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: post_follows_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY post_follows
      ADD CONSTRAINT post_follows_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: posts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY posts
      ADD CONSTRAINT posts_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY schema_migrations
      ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);
  
  
  --
  -- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY users
      ADD CONSTRAINT users_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: index_comments_on_post_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_comments_on_post_id ON comments USING btree (post_id);
  
  
  --
  -- Name: index_comments_on_user_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_comments_on_user_id ON comments USING btree (user_id);
  
  
  --
  -- Name: index_post_follows_on_post_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_post_follows_on_post_id ON post_follows USING btree (post_id);
  
  
  --
  -- Name: index_post_follows_on_post_id_and_user_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE UNIQUE INDEX index_post_follows_on_post_id_and_user_id ON post_follows USING btree (post_id, user_id);
  
  
  --
  -- Name: index_post_follows_on_user_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_post_follows_on_user_id ON post_follows USING btree (user_id);
  
  
  --
  -- Name: index_posts_on_slug; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_posts_on_slug ON posts USING btree (slug);
  
  
  --
  -- Name: index_posts_on_status; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_posts_on_status ON posts USING btree (status);
  
  
  --
  -- Name: index_posts_on_user_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_posts_on_user_id ON posts USING btree (user_id);
  
  
  --
  -- Name: index_users_on_authentication_token; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE UNIQUE INDEX index_users_on_authentication_token ON users USING btree (authentication_token);
  
  
  --
  -- Name: index_users_on_email; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE UNIQUE INDEX index_users_on_email ON users USING btree (email);
  
  
  --
  -- Name: index_users_on_login; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE UNIQUE INDEX index_users_on_login ON users USING btree (login);
  
  
  --
  -- Name: fk_rails_03de2dc08c; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY comments
      ADD CONSTRAINT fk_rails_03de2dc08c FOREIGN KEY (user_id) REFERENCES users(id);
  
  
  --
  -- Name: fk_rails_2fd19c0db7; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY comments
      ADD CONSTRAINT fk_rails_2fd19c0db7 FOREIGN KEY (post_id) REFERENCES posts(id);
  
  
  --
  -- Name: fk_rails_5b5ddfd518; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY posts
      ADD CONSTRAINT fk_rails_5b5ddfd518 FOREIGN KEY (user_id) REFERENCES users(id);
  
  
  --
  -- Name: fk_rails_8cdaf33e9c; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY post_follows
      ADD CONSTRAINT fk_rails_8cdaf33e9c FOREIGN KEY (user_id) REFERENCES users(id);
  
  
  --
  -- Name: fk_rails_afb3620fdd; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY post_follows
      ADD CONSTRAINT fk_rails_afb3620fdd FOREIGN KEY (post_id) REFERENCES posts(id);
  
  
  --
  -- PostgreSQL database dump complete
  --
  
  SET search_path TO "$user", public;
  
  INSERT INTO schema_migrations (version) VALUES ('20160416210834'), ('20160416210925'), ('20160419135810'), ('20160419140021'), ('20160419152141'), ('20160419165512'), ('20160419204839');
  
  
  