+CREATE SEQUENCE public.oauth_openid_requests_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+
+--
+-- Name: oauth_openid_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE public.oauth_openid_requests_id_seq OWNED BY public.oauth_openid_requests.id;
+
+
+--
+-- Name: oauth_tokens; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.oauth_tokens (
+ id integer NOT NULL,
+ user_id integer,
+ type character varying(20),
+ client_application_id integer,
+ token character varying(50),
+ secret character varying(50),
+ authorized_at timestamp without time zone,
+ invalidated_at timestamp without time zone,
+ created_at timestamp without time zone,
+ updated_at timestamp without time zone,
+ allow_read_prefs boolean DEFAULT false NOT NULL,
+ allow_write_prefs boolean DEFAULT false NOT NULL,
+ allow_write_diary boolean DEFAULT false NOT NULL,
+ allow_write_api boolean DEFAULT false NOT NULL,
+ allow_read_gpx boolean DEFAULT false NOT NULL,
+ allow_write_gpx boolean DEFAULT false NOT NULL,
+ callback_url character varying,
+ verifier character varying(20),
+ scope character varying,
+ valid_to timestamp without time zone,
+ allow_write_notes boolean DEFAULT false NOT NULL
+);
+
+
+--
+-- Name: oauth_tokens_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE public.oauth_tokens_id_seq
+ AS integer
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+
+--
+-- Name: oauth_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE public.oauth_tokens_id_seq OWNED BY public.oauth_tokens.id;
+
+
+--
+-- Name: redactions; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.redactions (
+ id integer NOT NULL,
+ title character varying,
+ description text,
+ created_at timestamp without time zone,
+ updated_at timestamp without time zone,
+ user_id bigint NOT NULL,
+ description_format public.format_enum DEFAULT 'markdown'::public.format_enum NOT NULL
+);
+
+
+--
+-- Name: redactions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE public.redactions_id_seq
+ AS integer
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+
+--
+-- Name: redactions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE public.redactions_id_seq OWNED BY public.redactions.id;
+
+
+--
+-- Name: relation_members; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.relation_members (
+ relation_id bigint NOT NULL,
+ member_type public.nwr_enum NOT NULL,
+ member_id bigint NOT NULL,
+ member_role character varying NOT NULL,
+ version bigint DEFAULT 0 NOT NULL,
+ sequence_id integer DEFAULT 0 NOT NULL
+);
+
+
+--
+-- Name: relation_tags; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.relation_tags (
+ relation_id bigint NOT NULL,
+ k character varying DEFAULT ''::character varying NOT NULL,
+ v character varying DEFAULT ''::character varying NOT NULL,
+ version bigint NOT NULL
+);
+
+
+--
+-- Name: relations; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.relations (
+ relation_id bigint NOT NULL,
+ changeset_id bigint NOT NULL,
+ "timestamp" timestamp without time zone NOT NULL,
+ version bigint NOT NULL,
+ visible boolean DEFAULT true NOT NULL,
+ redaction_id integer
+);
+
+
+--
+-- Name: reports; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.reports (
+ id integer NOT NULL,
+ issue_id integer NOT NULL,
+ user_id integer NOT NULL,
+ details text NOT NULL,
+ category character varying NOT NULL,
+ created_at timestamp without time zone NOT NULL,
+ updated_at timestamp without time zone NOT NULL
+);
+
+
+--
+-- Name: reports_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE public.reports_id_seq
+ AS integer
+ 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: user_blocks; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.user_blocks (
+ id integer NOT NULL,
+ user_id bigint NOT NULL,