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: 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';
  
  
  --
  -- Name: report_type; Type: TYPE; Schema: public; Owner: -
  --
  
  CREATE TYPE public.report_type AS ENUM (
      'baseline',
      'monitoring'
  );
  
  
  SET default_tablespace = '';
  
  SET default_with_oids = false;
  
  --
  -- 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: carrierwave_files; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.carrierwave_files (
      id integer NOT NULL,
      path character varying NOT NULL,
      pg_largeobject_oid oid NOT NULL,
      size integer NOT NULL,
      content_type character varying,
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL
  );
  
  
  --
  -- Name: carrierwave_files_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.carrierwave_files_id_seq
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: carrierwave_files_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.carrierwave_files_id_seq OWNED BY public.carrierwave_files.id;
  
  
  --
  -- Name: delayed_jobs; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.delayed_jobs (
      id integer NOT NULL,
      priority integer DEFAULT 0 NOT NULL,
      attempts integer DEFAULT 0 NOT NULL,
      handler text NOT NULL,
      last_error text,
      run_at timestamp without time zone,
      locked_at timestamp without time zone,
      failed_at timestamp without time zone,
      locked_by character varying,
      queue character varying,
      created_at timestamp without time zone,
      updated_at timestamp without time zone
  );
  
  
  --
  -- Name: delayed_jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.delayed_jobs_id_seq
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: delayed_jobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.delayed_jobs_id_seq OWNED BY public.delayed_jobs.id;
  
  
  --
  -- Name: photos; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.photos (
      id integer NOT NULL,
      report_id integer NOT NULL,
      caption text,
      image character varying(255) NOT NULL,
      image_size integer NOT NULL,
      image_content_type character varying(255) NOT NULL,
      taken_at timestamp without time zone,
      latitude numeric(10,7),
      longitude numeric(10,7),
      altitude numeric(12,7),
      image_direction numeric(10,7),
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL,
      creator_id integer,
      updater_id integer
  );
  
  
  --
  -- Name: photos_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.photos_id_seq
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: photos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.photos_id_seq OWNED BY public.photos.id;
  
  
  --
  -- Name: reports; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.reports (
      id integer NOT NULL,
      property_name character varying(255),
      monitoring_year smallint,
      photographer_name character varying(255),
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL,
      creator_id integer,
      updater_id integer,
      upload_progress character varying(20),
      pdf_progress character varying(20),
      type public.report_type DEFAULT 'monitoring'::public.report_type NOT NULL,
      extra_signatures character varying(255)[],
      pdf character varying,
      photo_starting_num integer DEFAULT 1 NOT NULL
  );
  
  
  --
  -- Name: reports_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.reports_id_seq
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: reports_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.reports_id_seq OWNED BY public.reports.id;
  
  
  --
  -- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.schema_migrations (
      version character varying NOT NULL
  );
  
  
  --
  -- Name: uploads; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.uploads (
      id integer NOT NULL,
      uuid character varying(36) NOT NULL,
      file character varying(255) NOT NULL,
      file_size integer NOT NULL,
      file_content_type character varying(255) NOT NULL,
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL,
      creator_id integer,
      updater_id integer
  );
  
  
  --
  -- Name: uploads_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.uploads_id_seq
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: uploads_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.uploads_id_seq OWNED BY public.uploads.id;
  
  
  --
  -- Name: users; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.users (
      id integer NOT NULL,
      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,
      provider character varying(100) NOT NULL,
      uid character varying(100) NOT NULL,
      email character varying(255),
      first_name character varying(255),
      last_name character varying(255),
      name character varying(255),
      created_at timestamp without time zone NOT NULL,
      updated_at timestamp without time zone NOT NULL,
      deleted_at timestamp without time zone,
      creator_id integer,
      updater_id integer,
      deleter_id integer
  );
  
  
  --
  -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.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 public.users_id_seq OWNED BY public.users.id;
  
  
  --
  -- Name: carrierwave_files id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.carrierwave_files ALTER COLUMN id SET DEFAULT nextval('public.carrierwave_files_id_seq'::regclass);
  
  
  --
  -- Name: delayed_jobs id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.delayed_jobs ALTER COLUMN id SET DEFAULT nextval('public.delayed_jobs_id_seq'::regclass);
  
  
  --
  -- Name: photos id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.photos ALTER COLUMN id SET DEFAULT nextval('public.photos_id_seq'::regclass);
  
  
  --
  -- Name: reports id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.reports ALTER COLUMN id SET DEFAULT nextval('public.reports_id_seq'::regclass);
  
  
  --
  -- Name: uploads id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.uploads ALTER COLUMN id SET DEFAULT nextval('public.uploads_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: 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: carrierwave_files carrierwave_files_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.carrierwave_files
      ADD CONSTRAINT carrierwave_files_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: delayed_jobs delayed_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.delayed_jobs
      ADD CONSTRAINT delayed_jobs_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: photos photos_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.photos
      ADD CONSTRAINT photos_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: reports reports_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.reports
      ADD CONSTRAINT reports_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: uploads uploads_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.uploads
      ADD CONSTRAINT uploads_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: delayed_jobs_priority; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX delayed_jobs_priority ON public.delayed_jobs USING btree (priority, run_at);
  
  
  --
  -- Name: index_carrierwave_files_on_path; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE UNIQUE INDEX index_carrierwave_files_on_path ON public.carrierwave_files USING btree (path);
  
  
  --
  -- Name: index_uploads_on_uuid; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE UNIQUE INDEX index_uploads_on_uuid ON public.uploads USING btree (uuid);
  
  
  --
  -- Name: index_users_on_deleted_at; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_users_on_deleted_at ON public.users USING btree (deleted_at);
  
  
  --
  -- Name: index_users_on_provider_and_uid; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE UNIQUE INDEX index_users_on_provider_and_uid ON public.users USING btree (provider, uid);
  
  
  --
  -- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE UNIQUE INDEX unique_schema_migrations ON public.schema_migrations USING btree (version);
  
  
  --
  -- Name: photos fk_rails_ff8adce01c; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.photos
      ADD CONSTRAINT fk_rails_ff8adce01c FOREIGN KEY (report_id) REFERENCES public.reports(id);
  
  
  --
  -- PostgreSQL database dump complete
  --
  
  SET search_path TO "$user", public;
  
  INSERT INTO "schema_migrations" (version) VALUES
  ('20160903014955'),
  ('20160903021214'),
  ('20160903021222'),
  ('20160903025431'),
  ('20160903201238'),
  ('20160924223129'),
  ('20160925021236'),
  ('20160925030340'),
  ('20170528233325'),
  ('20170528233338'),
  ('20170528233404'),
  ('20170529135012'),
  ('20170529165420'),
  ('20181123221547'),
  ('20181124014134'),
  ('20181124025550'),
  ('20190728144143'),
  ('20200422042833');
  
  
  