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';
  
  
  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(6) without time zone NOT NULL,
      updated_at timestamp(6) without time zone NOT NULL
  );
  
  
  --
  -- Name: chapters; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.chapters (
      id bigint NOT NULL,
      hash character varying,
      manga_id bigint,
      volume integer DEFAULT 0 NOT NULL,
      chapter integer DEFAULT 0 NOT NULL,
      title character varying DEFAULT ''::character varying NOT NULL,
      language character varying DEFAULT 'ja_JP'::character varying NOT NULL,
      users_id bigint,
      created_at timestamp(6) without time zone NOT NULL,
      updated_at timestamp(6) without time zone NOT NULL
  );
  
  
  --
  -- Name: chapters_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.chapters_id_seq
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: chapters_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.chapters_id_seq OWNED BY public.chapters.id;
  
  
  --
  -- Name: manga; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.manga (
      id bigint NOT NULL,
      titles text[] DEFAULT '{}'::text[],
      description text DEFAULT ''::text NOT NULL,
      language character varying DEFAULT 'ja_JP'::character varying NOT NULL,
      type character varying DEFAULT 'manga'::character varying NOT NULL,
      links text[] DEFAULT '{}'::text[],
      last_updated timestamp without time zone,
      cover_data text,
      created_at timestamp(6) without time zone NOT NULL,
      updated_at timestamp(6) without time zone NOT NULL
  );
  
  
  --
  -- Name: manga_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.manga_id_seq
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: manga_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.manga_id_seq OWNED BY public.manga.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 bigint NOT NULL,
      session_id character varying NOT NULL,
      data text,
      created_at timestamp(6) without time zone NOT NULL,
      updated_at timestamp(6) without time zone NOT NULL
  );
  
  
  --
  -- Name: sessions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.sessions_id_seq
      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: users; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.users (
      id bigint 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,
      confirmation_token character varying,
      confirmed_at timestamp without time zone,
      confirmation_sent_at timestamp without time zone,
      unconfirmed_email character varying,
      username character varying,
      created_at timestamp(6) without time zone NOT NULL,
      updated_at timestamp(6) without time zone NOT NULL,
      admin boolean DEFAULT false NOT NULL,
      mod boolean DEFAULT false NOT NULL,
      supporter boolean DEFAULT false,
      started_supporting_at timestamp without time zone,
      public_relations boolean DEFAULT false NOT NULL,
      total_chapters_read integer DEFAULT 0 NOT NULL,
      website character varying DEFAULT ''::character varying NOT NULL,
      bio text DEFAULT ''::text NOT NULL,
      md_at_home boolean DEFAULT false NOT NULL,
      avatar_data text,
      view_hentai boolean DEFAULT false NOT NULL,
      notify_when_updated boolean DEFAULT true NOT NULL,
      show_moderated_posts boolean DEFAULT false NOT NULL,
      theme character varying DEFAULT 'light'::character varying NOT NULL,
      excluded_tags text[] DEFAULT '{}'::text[],
      shown_chapter_langs text[] DEFAULT '{en_US}'::text[],
      nav integer,
      mdh_portlimit boolean DEFAULT false NOT NULL,
      show_unavailable_chapters boolean DEFAULT false NOT NULL,
      last_active_at timestamp without time zone
  );
  
  
  --
  -- 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: views; Type: TABLE; Schema: public; Owner: -
  --
  
  CREATE TABLE public.views (
      id bigint NOT NULL,
      type text[] DEFAULT '{}'::text[],
      users_id bigint,
      manga_id bigint,
      chapters_id bigint,
      created_at timestamp(6) without time zone NOT NULL,
      updated_at timestamp(6) without time zone NOT NULL
  );
  
  
  --
  -- Name: views_id_seq; Type: SEQUENCE; Schema: public; Owner: -
  --
  
  CREATE SEQUENCE public.views_id_seq
      START WITH 1
      INCREMENT BY 1
      NO MINVALUE
      NO MAXVALUE
      CACHE 1;
  
  
  --
  -- Name: views_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
  --
  
  ALTER SEQUENCE public.views_id_seq OWNED BY public.views.id;
  
  
  --
  -- Name: chapters id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.chapters ALTER COLUMN id SET DEFAULT nextval('public.chapters_id_seq'::regclass);
  
  
  --
  -- Name: manga id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.manga ALTER COLUMN id SET DEFAULT nextval('public.manga_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: users id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);
  
  
  --
  -- Name: views id; Type: DEFAULT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.views ALTER COLUMN id SET DEFAULT nextval('public.views_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: chapters chapters_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.chapters
      ADD CONSTRAINT chapters_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: manga manga_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.manga
      ADD CONSTRAINT manga_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: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.users
      ADD CONSTRAINT users_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: views views_pkey; Type: CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.views
      ADD CONSTRAINT views_pkey PRIMARY KEY (id);
  
  
  --
  -- Name: index_chapters_on_manga_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_chapters_on_manga_id ON public.chapters USING btree (manga_id);
  
  
  --
  -- Name: index_chapters_on_users_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_chapters_on_users_id ON public.chapters USING btree (users_id);
  
  
  --
  -- 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_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_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_username; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE UNIQUE INDEX index_users_on_username ON public.users USING btree (username);
  
  
  --
  -- Name: index_views_on_chapters_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_views_on_chapters_id ON public.views USING btree (chapters_id);
  
  
  --
  -- Name: index_views_on_manga_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_views_on_manga_id ON public.views USING btree (manga_id);
  
  
  --
  -- Name: index_views_on_users_id; Type: INDEX; Schema: public; Owner: -
  --
  
  CREATE INDEX index_views_on_users_id ON public.views USING btree (users_id);
  
  
  --
  -- Name: views fk_rails_2f590364ee; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.views
      ADD CONSTRAINT fk_rails_2f590364ee FOREIGN KEY (chapters_id) REFERENCES public.chapters(id);
  
  
  --
  -- Name: chapters fk_rails_58f6d77081; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.chapters
      ADD CONSTRAINT fk_rails_58f6d77081 FOREIGN KEY (manga_id) REFERENCES public.manga(id);
  
  
  --
  -- Name: views fk_rails_a0cc03e878; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.views
      ADD CONSTRAINT fk_rails_a0cc03e878 FOREIGN KEY (manga_id) REFERENCES public.manga(id);
  
  
  --
  -- Name: chapters fk_rails_af5a443035; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.chapters
      ADD CONSTRAINT fk_rails_af5a443035 FOREIGN KEY (users_id) REFERENCES public.users(id);
  
  
  --
  -- Name: views fk_rails_c8ee5b9714; Type: FK CONSTRAINT; Schema: public; Owner: -
  --
  
  ALTER TABLE ONLY public.views
      ADD CONSTRAINT fk_rails_c8ee5b9714 FOREIGN KEY (users_id) REFERENCES public.users(id);
  
  
  --
  -- PostgreSQL database dump complete
  --
  
  SET search_path TO "$user", public;
  
  INSERT INTO "schema_migrations" (version) VALUES
  ('20210510143018'),
  ('20210510143110'),
  ('20210510143358'),
  ('20210510143434'),
  ('20210510143530'),
  ('20210510143613'),
  ('20210510144226'),
  ('20210510150603'),
  ('20210510150650'),
  ('20210510151250'),
  ('20210510151517'),
  ('20210512142345'),
  ('20210512181221');
  
  
  