text: SET statement_timeout = 0;
  SET lock_timeout = 0;
  SET idle_in_transaction_session_timeout = 0;
  SET client_encoding = 'UTF8';
  SET standard_conforming_strings = on;
  SELECT pg_catalog.set_config('search_path', '', false);
  SET check_function_bodies = false;
  SET xmloption = content;
  SET client_min_messages = warning;
  SET row_security = off;
  
  --
  -- Name: cause_of_death; Type: TYPE; Schema: public; Owner: -
  --
  
  CREATE TYPE public.cause_of_death AS ENUM (
      'choking',
      'shooting',
      'beating',
      'taser',
      'vehicular',
      'medical neglect',
      'response to medical emergency',
      'suicide',
      'chemical_agents_or_weapons',
      'drowning',
      'stabbing',
      'bombing'
  );
  
  
  --
  -- Name: jurisdiction; Type: TYPE; Schema: public; Owner: -
  --
  
  CREATE TYPE public.jurisdiction AS ENUM (
      'unknown',
      'local',
      'state',
      'federal',
      'university',
      'commercial'
  );
  
  
  SET default_tablespace = '';
  
  SET default_table_access_method = heap;
  
  --
  -- Name: agencies; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.agencies (
      id integer NOT NULL,
      name character varying NOT NULL,
      street_address character varying,
      city character varying,
      state_id integer,
      zipcode character varying,
      telephone character varying,
      email character varying,
      website character varying,
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL,
      slug character varying,
      longitude double precision,
      latitude double precision,
      jurisdiction public.jurisdiction DEFAULT 'unknown'::public.jurisdiction
  );
  
  
  --
  -- Name: agencies_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.agencies_id_seq
      AS integer
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: agencies_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.agencies_id_seq OWNED BY public.agencies.id;
  
  
  --
  -- Name: ahoy_events; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.ahoy_events (
      id uuid NOT NULL,
      visit_id uuid,
      user_id integer,
      name character varying,
      properties text,
      "time" timestamp without time zone
  );
  
  
  --
  -- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.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: case_agencies; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.case_agencies (
      id integer NOT NULL,
      case_id integer,
      agency_id integer,
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL
  );
  
  
  --
  -- Name: case_agencies_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.case_agencies_id_seq
      AS integer
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: case_agencies_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.case_agencies_id_seq OWNED BY public.case_agencies.id;
  
  
  --
  -- Name: case_officers; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.case_officers (
      id integer NOT NULL,
      case_id integer,
      officer_id integer,
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL
  );
  
  
  --
  -- Name: case_officers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.case_officers_id_seq
      AS integer
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: case_officers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.case_officers_id_seq OWNED BY public.case_officers.id;
  
  
  --
  -- Name: cases; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.cases (
      id integer NOT NULL,
      title character varying NOT NULL,
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL,
      user_id integer,
      cause_of_death_id integer,
      date date,
      state_id integer,
      city character varying NOT NULL,
      address character varying,
      zipcode character varying,
      longitude double precision,
      latitude double precision,
      avatar character varying,
      slug character varying,
      video_url character varying,
      state character varying,
      age integer,
      overview text NOT NULL,
      community_action text,
      litigation text,
      country character varying,
      remove_avatar boolean,
      summary text NOT NULL,
      follows_count integer DEFAULT 0 NOT NULL,
      default_avatar_url character varying,
      blurb text,
      cause_of_death_name public.cause_of_death
  );
  
  
  --
  -- Name: cases_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.cases_id_seq
      AS integer
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: cases_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.cases_id_seq OWNED BY public.cases.id;
  
  
  --
  -- Name: causes_of_death; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.causes_of_death (
      id integer NOT NULL,
      name character varying,
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL
  );
  
  
  --
  -- Name: causes_of_death_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.causes_of_death_id_seq
      AS integer
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: causes_of_death_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.causes_of_death_id_seq OWNED BY public.causes_of_death.id;
  
  
  --
  -- Name: comments; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.comments (
      id integer NOT NULL,
      content text,
      commentable_id integer,
      commentable_type character varying,
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL,
      user_id integer
  );
  
  
  --
  -- Name: comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.comments_id_seq
      AS integer
      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 public.comments_id_seq OWNED BY public.comments.id;
  
  
  --
  -- Name: ethnicities; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.ethnicities (
      id integer NOT NULL,
      title character varying,
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL,
      slug character varying
  );
  
  
  --
  -- Name: ethnicities_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.ethnicities_id_seq
      AS integer
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: ethnicities_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.ethnicities_id_seq OWNED BY public.ethnicities.id;
  
  
  --
  -- Name: event_statuses; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.event_statuses (
      id integer NOT NULL,
      name character varying,
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL
  );
  
  
  --
  -- Name: event_statuses_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.event_statuses_id_seq
      AS integer
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: event_statuses_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.event_statuses_id_seq OWNED BY public.event_statuses.id;
  
  
  --
  -- Name: follows; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.follows (
      id integer NOT NULL,
      followable_id integer NOT NULL,
      followable_type character varying NOT NULL,
      follower_id integer NOT NULL,
      follower_type character varying NOT NULL,
      blocked boolean DEFAULT false NOT NULL,
      created_at timestamp without time zone,
      updated_at timestamp without time zone
  );
  
  
  --
  -- Name: follows_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.follows_id_seq
      AS integer
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: follows_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.follows_id_seq OWNED BY public.follows.id;
  
  
  --
  -- Name: friendly_id_slugs; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.friendly_id_slugs (
      id integer NOT NULL,
      slug character varying NOT NULL,
      sluggable_id integer NOT NULL,
      sluggable_type character varying(50),
      scope character varying,
      created_at timestamp without time zone
  );
  
  
  --
  -- Name: friendly_id_slugs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.friendly_id_slugs_id_seq
      AS integer
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: friendly_id_slugs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.friendly_id_slugs_id_seq OWNED BY public.friendly_id_slugs.id;
  
  
  --
  -- Name: genders; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.genders (
      id integer NOT NULL,
      sex character varying,
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL,
      slug character varying
  );
  
  
  --
  -- Name: genders_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.genders_id_seq
      AS integer
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: genders_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.genders_id_seq OWNED BY public.genders.id;
  
  
  --
  -- Name: links; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.links (
      id integer NOT NULL,
      url character varying,
      linkable_id integer,
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL,
      title character varying,
      linkable_type character varying
  );
  
  
  --
  -- Name: links_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.links_id_seq
      AS integer
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: links_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.links_id_seq OWNED BY public.links.id;
  
  
  --
  -- Name: mailboxer_conversation_opt_outs; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.mailboxer_conversation_opt_outs (
      id integer NOT NULL,
      unsubscriber_id integer,
      unsubscriber_type character varying,
      conversation_id integer
  );
  
  
  --
  -- Name: mailboxer_conversation_opt_outs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.mailboxer_conversation_opt_outs_id_seq
      AS integer
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: mailboxer_conversation_opt_outs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.mailboxer_conversation_opt_outs_id_seq OWNED BY public.mailboxer_conversation_opt_outs.id;
  
  
  --
  -- Name: mailboxer_conversations; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.mailboxer_conversations (
      id integer NOT NULL,
      subject character varying DEFAULT ''::character varying,
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL
  );
  
  
  --
  -- Name: mailboxer_conversations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.mailboxer_conversations_id_seq
      AS integer
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: mailboxer_conversations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.mailboxer_conversations_id_seq OWNED BY public.mailboxer_conversations.id;
  
  
  --
  -- Name: mailboxer_notifications; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.mailboxer_notifications (
      id integer NOT NULL,
      type character varying,
      body text,
      subject character varying DEFAULT ''::character varying,
      sender_id integer,
      sender_type character varying,
      conversation_id integer,
      draft boolean DEFAULT false,
      notification_code character varying,
      notified_object_id integer,
      notified_object_type character varying,
      attachment character varying,
      updated_at timestamp without time zone NOT NULL,
      created_at timestamp without time zone NOT NULL,
      global boolean DEFAULT false,
      expires timestamp without time zone
  );
  
  
  --
  -- Name: mailboxer_notifications_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.mailboxer_notifications_id_seq
      AS integer
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: mailboxer_notifications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.mailboxer_notifications_id_seq OWNED BY public.mailboxer_notifications.id;
  
  
  --
  -- Name: mailboxer_receipts; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.mailboxer_receipts (
      id integer NOT NULL,
      receiver_id integer,
      receiver_type character varying,
      notification_id integer NOT NULL,
      is_read boolean DEFAULT false,
      trashed boolean DEFAULT false,
      deleted boolean DEFAULT false,
      mailbox_type character varying(25),
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL
  );
  
  
  --
  -- Name: mailboxer_receipts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.mailboxer_receipts_id_seq
      AS integer
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: mailboxer_receipts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.mailboxer_receipts_id_seq OWNED BY public.mailboxer_receipts.id;
  
  
  --
  -- Name: organizations; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.organizations (
      id integer NOT NULL,
      name character varying,
      description text,
      website character varying,
      telephone character varying,
      avatar character varying,
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL
  );
  
  
  --
  -- Name: organizations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.organizations_id_seq
      AS integer
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: organizations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.organizations_id_seq OWNED BY public.organizations.id;
  
  
  --
  -- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.schema_migrations (
      version character varying NOT NULL
  );
  
  
  --
  -- Name: sessions; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.sessions (
      id integer NOT NULL,
      session_id character varying NOT NULL,
      data text,
      created_at timestamp without time zone,
      updated_at timestamp without time zone
  );
  
  
  --
  -- Name: sessions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.sessions_id_seq
      AS integer
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: sessions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.sessions_id_seq OWNED BY public.sessions.id;
  
  
  --
  -- Name: states; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.states (
      id integer NOT NULL,
      name character varying,
      iso character varying,
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL,
      ansi_code character varying,
      slug character varying
  );
  
  
  --
  -- Name: states_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.states_id_seq
      AS integer
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: states_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.states_id_seq OWNED BY public.states.id;
  
  
  --
  -- Name: subjects; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.subjects (
      id integer NOT NULL,
      name character varying NOT NULL,
      age integer,
      gender_id integer,
      ethnicity_id integer,
      unarmed boolean,
      mentally_ill boolean,
      veteran boolean,
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL,
      case_id integer,
      homeless boolean
  );
  
  
  --
  -- Name: subjects_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.subjects_id_seq
      AS integer
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: subjects_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.subjects_id_seq OWNED BY public.subjects.id;
  
  
  --
  -- Name: users; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.users (
      id integer NOT NULL,
      email character varying DEFAULT ''::character varying NOT NULL,
      encrypted_password character varying DEFAULT ''::character varying NOT NULL,
      reset_password_token character varying,
      reset_password_sent_at timestamp without time zone,
      remember_created_at timestamp without time zone,
      sign_in_count integer DEFAULT 0 NOT NULL,
      current_sign_in_at timestamp without time zone,
      last_sign_in_at timestamp without time zone,
      current_sign_in_ip inet,
      last_sign_in_ip inet,
      created_at timestamp without time zone,
      updated_at timestamp without time zone,
      admin boolean DEFAULT false,
      latitude double precision,
      longitude double precision,
      name character varying NOT NULL,
      description text,
      state_id integer,
      state character varying,
      city character varying,
      facebook_url character varying,
      twitter_url character varying,
      linkedin character varying,
      slug character varying,
      subscribed boolean,
      analyst boolean DEFAULT false,
      confirmation_token character varying,
      confirmed_at timestamp without time zone,
      confirmation_sent_at timestamp without time zone
  );
  
  
  --
  -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.users_id_seq
      AS integer
      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 public.users_id_seq OWNED BY public.users.id;
  
  
  --
  -- Name: version_associations; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.version_associations (
      id integer NOT NULL,
      version_id integer,
      foreign_key_name character varying NOT NULL,
      foreign_key_id integer
  );
  
  
  --
  -- Name: version_associations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.version_associations_id_seq
      AS integer
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: version_associations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.version_associations_id_seq OWNED BY public.version_associations.id;
  
  
  --
  -- Name: versions; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.versions (
      id integer NOT NULL,
      item_type character varying NOT NULL,
      item_id integer NOT NULL,
      event character varying NOT NULL,
      whodunnit character varying,
      object text,
      created_at timestamp without time zone,
      object_changes text,
      ip character varying,
      transaction_id integer,
      comment text DEFAULT ''::text,
      author_id integer
  );
  
  
  --
  -- Name: versions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.versions_id_seq
      AS integer
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: versions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.versions_id_seq OWNED BY public.versions.id;
  
  
  --
  -- Name: visits; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.visits (
      id uuid NOT NULL,
      visitor_id uuid,
      ip character varying,
      user_agent text,
      referrer text,
      landing_page text,
      user_id integer,
      referring_domain character varying,
      search_keyword character varying,
      browser character varying,
      os character varying,
      device_type character varying,
      screen_height integer,
      screen_width integer,
      country character varying,
      region character varying,
      city character varying,
      utm_source character varying,
      utm_medium character varying,
      utm_term character varying,
      utm_content character varying,
      utm_campaign character varying,
      started_at timestamp without time zone
  );
  
  
  --
  -- Name: agencies id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.agencies ALTER COLUMN id SET DEFAULT nextval('public.agencies_id_seq'::regclass);
  
  
  --
  -- Name: case_agencies id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.case_agencies ALTER COLUMN id SET DEFAULT nextval('public.case_agencies_id_seq'::regclass);
  
  
  --
  -- Name: case_officers id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.case_officers ALTER COLUMN id SET DEFAULT nextval('public.case_officers_id_seq'::regclass);
  
  
  --
  -- Name: cases id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.cases ALTER COLUMN id SET DEFAULT nextval('public.cases_id_seq'::regclass);
  
  
  --
  -- Name: causes_of_death id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.causes_of_death ALTER COLUMN id SET DEFAULT nextval('public.causes_of_death_id_seq'::regclass);
  
  
  --
  -- Name: comments id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.comments ALTER COLUMN id SET DEFAULT nextval('public.comments_id_seq'::regclass);
  
  
  --
  -- Name: ethnicities id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.ethnicities ALTER COLUMN id SET DEFAULT nextval('public.ethnicities_id_seq'::regclass);
  
  
  --
  -- Name: event_statuses id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.event_statuses ALTER COLUMN id SET DEFAULT nextval('public.event_statuses_id_seq'::regclass);
  
  
  --
  -- Name: follows id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.follows ALTER COLUMN id SET DEFAULT nextval('public.follows_id_seq'::regclass);
  
  
  --
  -- Name: friendly_id_slugs id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.friendly_id_slugs ALTER COLUMN id SET DEFAULT nextval('public.friendly_id_slugs_id_seq'::regclass);
  
  
  --
  -- Name: genders id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.genders ALTER COLUMN id SET DEFAULT nextval('public.genders_id_seq'::regclass);
  
  
  --
  -- Name: links id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.links ALTER COLUMN id SET DEFAULT nextval('public.links_id_seq'::regclass);
  
  
  --
  -- Name: mailboxer_conversation_opt_outs id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.mailboxer_conversation_opt_outs ALTER COLUMN id SET DEFAULT nextval('public.mailboxer_conversation_opt_outs_id_seq'::regclass);
  
  
  --
  -- Name: mailboxer_conversations id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.mailboxer_conversations ALTER COLUMN id SET DEFAULT nextval('public.mailboxer_conversations_id_seq'::regclass);
  
  
  --
  -- Name: mailboxer_notifications id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.mailboxer_notifications ALTER COLUMN id SET DEFAULT nextval('public.mailboxer_notifications_id_seq'::regclass);
  
  
  --
  -- Name: mailboxer_receipts id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.mailboxer_receipts ALTER COLUMN id SET DEFAULT nextval('public.mailboxer_receipts_id_seq'::regclass);
  
  
  --
  -- Name: organizations id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.organizations ALTER COLUMN id SET DEFAULT nextval('public.organizations_id_seq'::regclass);
  
  
  --
  -- Name: sessions id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.sessions ALTER COLUMN id SET DEFAULT nextval('public.sessions_id_seq'::regclass);
  
  
  --
  -- Name: states id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.states ALTER COLUMN id SET DEFAULT nextval('public.states_id_seq'::regclass);
  
  
  --
  -- Name: subjects id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.subjects ALTER COLUMN id SET DEFAULT nextval('public.subjects_id_seq'::regclass);
  
  
  --
  -- Name: users id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);
  
  
  --
  -- Name: version_associations id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.version_associations ALTER COLUMN id SET DEFAULT nextval('public.version_associations_id_seq'::regclass);
  
  
  --
  -- Name: versions id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.versions ALTER COLUMN id SET DEFAULT nextval('public.versions_id_seq'::regclass);
  
  
  --
  -- Name: agencies agencies_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.agencies
      ADD CONSTRAINT agencies_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: ahoy_events ahoy_events_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.ahoy_events
      ADD CONSTRAINT ahoy_events_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.ar_internal_metadata
      ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key);
  
  
  --
  -- Name: case_agencies case_agencies_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.case_agencies
      ADD CONSTRAINT case_agencies_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: case_officers case_officers_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.case_officers
      ADD CONSTRAINT case_officers_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: cases cases_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.cases
      ADD CONSTRAINT cases_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: causes_of_death causes_of_death_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.causes_of_death
      ADD CONSTRAINT causes_of_death_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: comments comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.comments
      ADD CONSTRAINT comments_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: ethnicities ethnicities_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.ethnicities
      ADD CONSTRAINT ethnicities_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: event_statuses event_statuses_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.event_statuses
      ADD CONSTRAINT event_statuses_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: follows follows_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.follows
      ADD CONSTRAINT follows_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: friendly_id_slugs friendly_id_slugs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.friendly_id_slugs
      ADD CONSTRAINT friendly_id_slugs_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: genders genders_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.genders
      ADD CONSTRAINT genders_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: links links_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.links
      ADD CONSTRAINT links_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: mailboxer_conversation_opt_outs mailboxer_conversation_opt_outs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.mailboxer_conversation_opt_outs
      ADD CONSTRAINT mailboxer_conversation_opt_outs_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: mailboxer_conversations mailboxer_conversations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.mailboxer_conversations
      ADD CONSTRAINT mailboxer_conversations_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: mailboxer_notifications mailboxer_notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.mailboxer_notifications
      ADD CONSTRAINT mailboxer_notifications_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: mailboxer_receipts mailboxer_receipts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.mailboxer_receipts
      ADD CONSTRAINT mailboxer_receipts_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: organizations organizations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.organizations
      ADD CONSTRAINT organizations_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.schema_migrations
      ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);
  
  
  --
  -- Name: sessions sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.sessions
      ADD CONSTRAINT sessions_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: states states_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.states
      ADD CONSTRAINT states_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: subjects subjects_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.subjects
      ADD CONSTRAINT subjects_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.users
      ADD CONSTRAINT users_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: version_associations version_associations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.version_associations
      ADD CONSTRAINT version_associations_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: versions versions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.versions
      ADD CONSTRAINT versions_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: visits visits_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.visits
      ADD CONSTRAINT visits_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: fk_followables; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX fk_followables ON public.follows USING btree (followable_id, followable_type);
  
  
  --
  -- Name: fk_follows; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX fk_follows ON public.follows USING btree (follower_id, follower_type);
  
  
  --
  -- Name: index_ahoy_events_on_name; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_ahoy_events_on_name ON public.ahoy_events USING btree (name);
  
  
  --
  -- Name: index_ahoy_events_on_time; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_ahoy_events_on_time ON public.ahoy_events USING btree ("time");
  
  
  --
  -- Name: index_ahoy_events_on_user_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_ahoy_events_on_user_id ON public.ahoy_events USING btree (user_id);
  
  
  --
  -- Name: index_ahoy_events_on_visit_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_ahoy_events_on_visit_id ON public.ahoy_events USING btree (visit_id);
  
  
  --
  -- Name: index_cases_on_slug; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE UNIQUE INDEX index_cases_on_slug ON public.cases USING btree (slug);
  
  
  --
  -- Name: index_cases_on_title; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_cases_on_title ON public.cases USING btree (title);
  
  
  --
  -- Name: index_cases_on_user_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_cases_on_user_id ON public.cases USING btree (user_id);
  
  
  --
  -- Name: index_comments_on_commentable_id_and_commentable_type; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_comments_on_commentable_id_and_commentable_type ON public.comments USING btree (commentable_id, commentable_type);
  
  
  --
  -- Name: index_follows_on_created_at; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_follows_on_created_at ON public.follows USING btree (created_at);
  
  
  --
  -- Name: index_friendly_id_slugs_on_slug_and_sluggable_type; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_friendly_id_slugs_on_slug_and_sluggable_type ON public.friendly_id_slugs USING btree (slug, sluggable_type);
  
  
  --
  -- Name: index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE UNIQUE INDEX index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope ON public.friendly_id_slugs USING btree (slug, sluggable_type, scope);
  
  
  --
  -- Name: index_friendly_id_slugs_on_sluggable_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_friendly_id_slugs_on_sluggable_id ON public.friendly_id_slugs USING btree (sluggable_id);
  
  
  --
  -- Name: index_friendly_id_slugs_on_sluggable_type; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_friendly_id_slugs_on_sluggable_type ON public.friendly_id_slugs USING btree (sluggable_type);
  
  
  --
  -- Name: index_links_on_linkable_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_links_on_linkable_id ON public.links USING btree (linkable_id);
  
  
  --
  -- Name: index_links_on_linkable_id_and_linkable_type; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_links_on_linkable_id_and_linkable_type ON public.links USING btree (linkable_id, linkable_type);
  
  
  --
  -- Name: index_mailboxer_conversation_opt_outs_on_conversation_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_mailboxer_conversation_opt_outs_on_conversation_id ON public.mailboxer_conversation_opt_outs USING btree (conversation_id);
  
  
  --
  -- Name: index_mailboxer_conversation_opt_outs_on_unsubscriber_id_type; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_mailboxer_conversation_opt_outs_on_unsubscriber_id_type ON public.mailboxer_conversation_opt_outs USING btree (unsubscriber_id, unsubscriber_type);
  
  
  --
  -- Name: index_mailboxer_notifications_on_conversation_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_mailboxer_notifications_on_conversation_id ON public.mailboxer_notifications USING btree (conversation_id);
  
  
  --
  -- Name: index_mailboxer_notifications_on_notified_object_id_and_type; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_mailboxer_notifications_on_notified_object_id_and_type ON public.mailboxer_notifications USING btree (notified_object_id, notified_object_type);
  
  
  --
  -- Name: index_mailboxer_notifications_on_sender_id_and_sender_type; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_mailboxer_notifications_on_sender_id_and_sender_type ON public.mailboxer_notifications USING btree (sender_id, sender_type);
  
  
  --
  -- Name: index_mailboxer_notifications_on_type; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_mailboxer_notifications_on_type ON public.mailboxer_notifications USING btree (type);
  
  
  --
  -- Name: index_mailboxer_receipts_on_notification_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_mailboxer_receipts_on_notification_id ON public.mailboxer_receipts USING btree (notification_id);
  
  
  --
  -- Name: index_mailboxer_receipts_on_receiver_id_and_receiver_type; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_mailboxer_receipts_on_receiver_id_and_receiver_type ON public.mailboxer_receipts USING btree (receiver_id, receiver_type);
  
  
  --
  -- Name: index_sessions_on_session_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE UNIQUE INDEX index_sessions_on_session_id ON public.sessions USING btree (session_id);
  
  
  --
  -- Name: index_sessions_on_updated_at; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_sessions_on_updated_at ON public.sessions USING btree (updated_at);
  
  
  --
  -- Name: index_states_on_ansi_code; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_states_on_ansi_code ON public.states USING btree (ansi_code);
  
  
  --
  -- Name: index_states_on_name; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_states_on_name ON public.states USING btree (name);
  
  
  --
  -- Name: index_users_on_admin; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_users_on_admin ON public.users USING btree (admin);
  
  
  --
  -- Name: index_users_on_confirmation_token; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE UNIQUE INDEX index_users_on_confirmation_token ON public.users USING btree (confirmation_token);
  
  
  --
  -- Name: index_users_on_created_at; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_users_on_created_at ON public.users USING btree (created_at);
  
  
  --
  -- Name: index_users_on_email; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE UNIQUE INDEX index_users_on_email ON public.users USING btree (email);
  
  
  --
  -- Name: index_users_on_reset_password_token; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE UNIQUE INDEX index_users_on_reset_password_token ON public.users USING btree (reset_password_token);
  
  
  --
  -- Name: index_users_on_slug; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE UNIQUE INDEX index_users_on_slug ON public.users USING btree (slug);
  
  
  --
  -- Name: index_version_associations_on_foreign_key; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_version_associations_on_foreign_key ON public.version_associations USING btree (foreign_key_name, foreign_key_id);
  
  
  --
  -- Name: index_version_associations_on_version_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_version_associations_on_version_id ON public.version_associations USING btree (version_id);
  
  
  --
  -- Name: index_versions_on_item_type_and_item_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_versions_on_item_type_and_item_id ON public.versions USING btree (item_type, item_id);
  
  
  --
  -- Name: index_versions_on_transaction_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_versions_on_transaction_id ON public.versions USING btree (transaction_id);
  
  
  --
  -- Name: index_visits_on_started_at; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_visits_on_started_at ON public.visits USING btree (started_at);
  
  
  --
  -- Name: index_visits_on_user_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_visits_on_user_id ON public.visits USING btree (user_id);
  
  
  --
  -- Name: subjects fk_rails_94f26cc552; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.subjects
      ADD CONSTRAINT fk_rails_94f26cc552 FOREIGN KEY (case_id) REFERENCES public.cases(id) ON DELETE CASCADE;
  
  
  --
  -- Name: links fk_rails_d221076f62; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.links
      ADD CONSTRAINT fk_rails_d221076f62 FOREIGN KEY (linkable_id) REFERENCES public.cases(id);
  
  
  --
  -- Name: mailboxer_conversation_opt_outs mb_opt_outs_on_conversations_id; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.mailboxer_conversation_opt_outs
      ADD CONSTRAINT mb_opt_outs_on_conversations_id FOREIGN KEY (conversation_id) REFERENCES public.mailboxer_conversations(id);
  
  
  --
  -- Name: mailboxer_notifications notifications_on_conversation_id; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.mailboxer_notifications
      ADD CONSTRAINT notifications_on_conversation_id FOREIGN KEY (conversation_id) REFERENCES public.mailboxer_conversations(id);
  
  
  --
  -- Name: mailboxer_receipts receipts_on_notification_id; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.mailboxer_receipts
      ADD CONSTRAINT receipts_on_notification_id FOREIGN KEY (notification_id) REFERENCES public.mailboxer_notifications(id);
  
  
  --
  -- PostgreSQL database dump complete
  --
  
  SET search_path TO "$user", public;
  
  INSERT INTO "schema_migrations" (version) VALUES
  ('20170520020651'),
  ('20170919051847'),
  ('20180227022027'),
  ('20180508095145'),
  ('20180607033516'),
  ('20180703071052'),
  ('20180712191243'),
  ('20180716121459'),
  ('20180729010543'),
  ('20180816124609'),
  ('20180904123943'),
  ('20180911071251'),
  ('20180926083147'),
  ('20180926085044'),
  ('20180926091204'),
  ('20180926092536'),
  ('20180926123043'),
  ('20181001124317'),
  ('20181003112438'),
  ('20181003130555'),
  ('20181005060647'),
  ('20181008175901'),
  ('20181013103240'),
  ('20181025082828'),
  ('20181025220728'),
  ('20181026005352'),
  ('20190112221750'),
  ('20190112222534'),
  ('20190112223009'),
  ('20190112223318'),
  ('20190112223645'),
  ('20190112224118'),
  ('20190112224451'),
  ('20190112224801'),
  ('20190323221344'),
  ('20190406032344'),
  ('20190420191754'),
  ('20190422003442'),
  ('20190815012327'),
  ('20190824175709'),
  ('20190825000337'),
  ('20191114063555'),
  ('20200812015951'),
  ('20200901014746'),
  ('20211002101752'),
  ('20211009014322');
  
  
  