Skip to content

Instantly share code, notes, and snippets.

@ctrlcctrlv
Created December 19, 2022 01:29
Show Gist options
  • Select an option

  • Save ctrlcctrlv/a070d86f8d09755d697e9b4cf80818c3 to your computer and use it in GitHub Desktop.

Select an option

Save ctrlcctrlv/a070d86f8d09755d697e9b4cf80818c3 to your computer and use it in GitHub Desktop.
Default Akkoma PostgreSQL schema
--
-- PostgreSQL database dump
--
-- Dumped from database version 14.6
-- Dumped by pg_dump version 14.6
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: citext; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS citext WITH SCHEMA public;
--
-- Name: EXTENSION citext; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION citext IS 'data type for case-insensitive character strings';
--
-- Name: pg_trgm; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA public;
--
-- Name: EXTENSION pg_trgm; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION pg_trgm IS 'text similarity measurement and index searching based on trigrams';
--
-- Name: uuid-ossp; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA public;
--
-- Name: EXTENSION "uuid-ossp"; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION "uuid-ossp" IS 'generate universally unique identifiers (UUIDs)';
--
-- Name: notification_type; Type: TYPE; Schema: public; Owner: akkoma
--
CREATE TYPE public.notification_type AS ENUM (
'follow',
'follow_request',
'mention',
'move',
'pleroma:emoji_reaction',
'pleroma:chat_mention',
'reblog',
'favourite',
'pleroma:report',
'poll',
'update'
);
ALTER TYPE public.notification_type OWNER TO akkoma;
--
-- Name: oban_job_state; Type: TYPE; Schema: public; Owner: akkoma
--
CREATE TYPE public.oban_job_state AS ENUM (
'available',
'scheduled',
'executing',
'retryable',
'completed',
'discarded',
'cancelled'
);
ALTER TYPE public.oban_job_state OWNER TO akkoma;
--
-- Name: activity_visibility(character varying, character varying[], jsonb); Type: FUNCTION; Schema: public; Owner: akkoma
--
CREATE FUNCTION public.activity_visibility(actor character varying, recipients character varying[], data jsonb) RETURNS character varying
LANGUAGE plpgsql IMMUTABLE SECURITY DEFINER PARALLEL SAFE
AS $$
DECLARE
fa varchar;
public varchar := 'https://www.w3.org/ns/activitystreams#Public';
BEGIN
SELECT COALESCE(users.follower_address, '') into fa from public.users where users.ap_id = actor;
IF data->'to' ? public THEN
RETURN 'public';
ELSIF data->'cc' ? public THEN
RETURN 'unlisted';
ELSIF ARRAY[fa] && recipients THEN
RETURN 'private';
ELSIF not(ARRAY[fa, public] && recipients) THEN
RETURN 'direct';
ELSE
RETURN 'unknown';
END IF;
END;
$$;
ALTER FUNCTION public.activity_visibility(actor character varying, recipients character varying[], data jsonb) OWNER TO akkoma;
--
-- Name: oban_jobs_notify(); Type: FUNCTION; Schema: public; Owner: akkoma
--
CREATE FUNCTION public.oban_jobs_notify() RETURNS trigger
LANGUAGE plpgsql
AS $$
DECLARE
channel text;
notice json;
BEGIN
IF NEW.state = 'available' THEN
channel = 'public.oban_insert';
notice = json_build_object('queue', NEW.queue);
PERFORM pg_notify(channel, notice::text);
END IF;
RETURN NULL;
END;
$$;
ALTER FUNCTION public.oban_jobs_notify() OWNER TO akkoma;
--
-- Name: recipients_contain_blocked_domains(character varying[], character varying[]); Type: FUNCTION; Schema: public; Owner: akkoma
--
CREATE FUNCTION public.recipients_contain_blocked_domains(recipients character varying[], blocked_domains character varying[]) RETURNS boolean
LANGUAGE plpgsql
AS $$
DECLARE
recipient_domain varchar;
recipient varchar;
BEGIN
FOREACH recipient IN ARRAY recipients LOOP
recipient_domain = split_part(recipient, '/', 3)::varchar;
IF recipient_domain = ANY(blocked_domains) THEN
RETURN TRUE;
END IF;
END LOOP;
RETURN FALSE;
END;
$$;
ALTER FUNCTION public.recipients_contain_blocked_domains(recipients character varying[], blocked_domains character varying[]) OWNER TO akkoma;
--
-- Name: safe_jsonb_set(jsonb, text[], jsonb, boolean); Type: FUNCTION; Schema: public; Owner: akkoma
--
CREATE FUNCTION public.safe_jsonb_set(target jsonb, path text[], new_value jsonb, create_missing boolean DEFAULT true) RETURNS jsonb
LANGUAGE plpgsql
AS $$
declare
result jsonb;
begin
result := jsonb_set(target, path, coalesce(new_value, 'null'::jsonb), create_missing);
if result is NULL then
raise 'jsonb_set tried to wipe the object, please report this incident to Pleroma bug tracker. https://git.pleroma.social/pleroma/pleroma/issues/new';
return target;
else
return result;
end if;
end;
$$;
ALTER FUNCTION public.safe_jsonb_set(target jsonb, path text[], new_value jsonb, create_missing boolean) OWNER TO akkoma;
--
-- Name: thread_visibility(character varying, character varying, character varying); Type: FUNCTION; Schema: public; Owner: akkoma
--
CREATE FUNCTION public.thread_visibility(actor character varying, activity_id character varying, local_public character varying DEFAULT ''::character varying) RETURNS boolean
LANGUAGE plpgsql IMMUTABLE
AS $$
DECLARE
public varchar := 'https://www.w3.org/ns/activitystreams#Public';
child objects%ROWTYPE;
activity activities%ROWTYPE;
author_fa varchar;
valid_recipients varchar[];
actor_user_following varchar[];
BEGIN
--- Fetch actor following
SELECT array_agg(following.follower_address) INTO actor_user_following FROM following_relationships
JOIN users ON users.id = following_relationships.follower_id
JOIN users AS following ON following.id = following_relationships.following_id
WHERE users.ap_id = actor;
--- Fetch our initial activity.
SELECT * INTO activity FROM activities WHERE activities.data->>'id' = activity_id;
LOOP
--- Ensure that we have an activity before continuing.
--- If we don't, the thread is not satisfiable.
IF activity IS NULL THEN
RETURN false;
END IF;
--- We only care about Create activities.
IF activity.data->>'type' != 'Create' THEN
RETURN true;
END IF;
--- Normalize the child object into child.
SELECT * INTO child FROM objects
INNER JOIN activities ON COALESCE(activities.data->'object'->>'id', activities.data->>'object') = objects.data->>'id'
WHERE COALESCE(activity.data->'object'->>'id', activity.data->>'object') = objects.data->>'id';
--- Fetch the author's AS2 following collection.
SELECT COALESCE(users.follower_address, '') INTO author_fa FROM users WHERE users.ap_id = activity.actor;
--- Prepare valid recipients array.
valid_recipients := ARRAY[actor, public];
--- If we specified local public, add it.
IF local_public <> '' THEN
valid_recipients := valid_recipients || local_public;
END IF;
IF ARRAY[author_fa] && actor_user_following THEN
valid_recipients := valid_recipients || author_fa;
END IF;
--- Check visibility.
IF NOT valid_recipients && activity.recipients THEN
--- activity not visible, break out of the loop
RETURN false;
END IF;
--- If there's a parent, load it and do this all over again.
IF (child.data->'inReplyTo' IS NOT NULL) AND (child.data->'inReplyTo' != 'null'::jsonb) THEN
SELECT * INTO activity FROM activities
INNER JOIN objects ON COALESCE(activities.data->'object'->>'id', activities.data->>'object') = objects.data->>'id'
WHERE child.data->>'inReplyTo' = objects.data->>'id';
ELSE
RETURN true;
END IF;
END LOOP;
END;
$$;
ALTER FUNCTION public.thread_visibility(actor character varying, activity_id character varying, local_public character varying) OWNER TO akkoma;
--
-- Name: update_status_visibility_counter_cache(); Type: FUNCTION; Schema: public; Owner: akkoma
--
CREATE FUNCTION public.update_status_visibility_counter_cache() RETURNS trigger
LANGUAGE plpgsql
AS $_$
DECLARE
hostname character varying(255);
visibility_new character varying(64);
visibility_old character varying(64);
actor character varying(255);
BEGIN
IF TG_OP = 'DELETE' THEN
actor := OLD.actor;
ELSE
actor := NEW.actor;
END IF;
hostname := split_part(actor, '/', 3);
IF TG_OP = 'INSERT' THEN
visibility_new := activity_visibility(NEW.actor, NEW.recipients, NEW.data);
IF NEW.data->>'type' = 'Create'
AND visibility_new IN ('public', 'unlisted', 'private', 'direct') THEN
EXECUTE format('INSERT INTO "counter_cache" ("instance", %1$I) VALUES ($1, 1)
ON CONFLICT ("instance") DO
UPDATE SET %1$I = "counter_cache".%1$I + 1', visibility_new)
USING hostname;
END IF;
RETURN NEW;
ELSIF TG_OP = 'UPDATE' THEN
visibility_new := activity_visibility(NEW.actor, NEW.recipients, NEW.data);
visibility_old := activity_visibility(OLD.actor, OLD.recipients, OLD.data);
IF (NEW.data->>'type' = 'Create')
AND (OLD.data->>'type' = 'Create')
AND visibility_new != visibility_old
AND visibility_new IN ('public', 'unlisted', 'private', 'direct') THEN
EXECUTE format('UPDATE "counter_cache" SET
%1$I = greatest("counter_cache".%1$I - 1, 0),
%2$I = "counter_cache".%2$I + 1
WHERE "instance" = $1', visibility_old, visibility_new)
USING hostname;
END IF;
RETURN NEW;
ELSIF TG_OP = 'DELETE' THEN
IF OLD.data->>'type' = 'Create' THEN
visibility_old := activity_visibility(OLD.actor, OLD.recipients, OLD.data);
EXECUTE format('UPDATE "counter_cache" SET
%1$I = greatest("counter_cache".%1$I - 1, 0)
WHERE "instance" = $1', visibility_old)
USING hostname;
END IF;
RETURN OLD;
END IF;
END;
$_$;
ALTER FUNCTION public.update_status_visibility_counter_cache() OWNER TO akkoma;
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- Name: activities; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.activities (
id uuid NOT NULL,
data jsonb NOT NULL,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL,
local boolean DEFAULT true NOT NULL,
actor character varying(255),
recipients character varying(255)[] DEFAULT ARRAY[]::character varying[]
);
ALTER TABLE public.activities OWNER TO akkoma;
--
-- Name: activities_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.activities_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.activities_id_seq OWNER TO akkoma;
--
-- Name: activities_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.activities_id_seq OWNED BY public.activities.id;
--
-- Name: announcement_read_relationships; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.announcement_read_relationships (
id bigint NOT NULL,
user_id uuid,
announcement_id uuid,
inserted_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE public.announcement_read_relationships OWNER TO akkoma;
--
-- Name: announcement_read_relationships_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.announcement_read_relationships_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.announcement_read_relationships_id_seq OWNER TO akkoma;
--
-- Name: announcement_read_relationships_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.announcement_read_relationships_id_seq OWNED BY public.announcement_read_relationships.id;
--
-- Name: announcements; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.announcements (
id uuid NOT NULL,
data jsonb,
starts_at timestamp(0) without time zone,
ends_at timestamp(0) without time zone,
rendered jsonb,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE public.announcements OWNER TO akkoma;
--
-- Name: apps; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.apps (
id bigint NOT NULL,
client_name character varying(255) NOT NULL,
redirect_uris character varying(255) NOT NULL,
scopes character varying(255)[] DEFAULT ARRAY[]::character varying[] NOT NULL,
website character varying(255),
client_id character varying(255),
client_secret character varying(255),
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL,
trusted boolean DEFAULT false,
user_id uuid
);
ALTER TABLE public.apps OWNER TO akkoma;
--
-- Name: apps_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.apps_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.apps_id_seq OWNER TO akkoma;
--
-- Name: apps_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.apps_id_seq OWNED BY public.apps.id;
--
-- Name: backups; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.backups (
id bigint NOT NULL,
user_id uuid,
file_name character varying(255) NOT NULL,
content_type character varying(255) NOT NULL,
processed boolean DEFAULT false NOT NULL,
file_size bigint,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE public.backups OWNER TO akkoma;
--
-- Name: backups_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.backups_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.backups_id_seq OWNER TO akkoma;
--
-- Name: backups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.backups_id_seq OWNED BY public.backups.id;
--
-- Name: bookmarks; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.bookmarks (
id bigint NOT NULL,
user_id uuid NOT NULL,
activity_id uuid NOT NULL,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE public.bookmarks OWNER TO akkoma;
--
-- Name: bookmarks_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.bookmarks_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.bookmarks_id_seq OWNER TO akkoma;
--
-- Name: bookmarks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.bookmarks_id_seq OWNED BY public.bookmarks.id;
--
-- Name: chat_message_references; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.chat_message_references (
id uuid NOT NULL,
chat_id uuid NOT NULL,
object_id bigint NOT NULL,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL,
unread boolean DEFAULT true NOT NULL
);
ALTER TABLE public.chat_message_references OWNER TO akkoma;
--
-- Name: chats; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.chats (
id uuid NOT NULL,
user_id uuid,
recipient character varying(255),
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE public.chats OWNER TO akkoma;
--
-- Name: chats_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.chats_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.chats_id_seq OWNER TO akkoma;
--
-- Name: chats_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.chats_id_seq OWNED BY public.chats.id;
--
-- Name: config; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.config (
id bigint NOT NULL,
key character varying(255) NOT NULL,
value bytea NOT NULL,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL,
"group" character varying(255)
);
ALTER TABLE public.config OWNER TO akkoma;
--
-- Name: config_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.config_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.config_id_seq OWNER TO akkoma;
--
-- Name: config_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.config_id_seq OWNED BY public.config.id;
--
-- Name: conversation_participation_recipient_ships; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.conversation_participation_recipient_ships (
id bigint NOT NULL,
user_id uuid NOT NULL,
participation_id bigint NOT NULL
);
ALTER TABLE public.conversation_participation_recipient_ships OWNER TO akkoma;
--
-- Name: conversation_participation_recipient_ships_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.conversation_participation_recipient_ships_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.conversation_participation_recipient_ships_id_seq OWNER TO akkoma;
--
-- Name: conversation_participation_recipient_ships_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.conversation_participation_recipient_ships_id_seq OWNED BY public.conversation_participation_recipient_ships.id;
--
-- Name: conversation_participations; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.conversation_participations (
id bigint NOT NULL,
user_id uuid NOT NULL,
conversation_id bigint NOT NULL,
read boolean DEFAULT false NOT NULL,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE public.conversation_participations OWNER TO akkoma;
--
-- Name: conversation_participations_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.conversation_participations_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.conversation_participations_id_seq OWNER TO akkoma;
--
-- Name: conversation_participations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.conversation_participations_id_seq OWNED BY public.conversation_participations.id;
--
-- Name: conversations; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.conversations (
id bigint NOT NULL,
ap_id character varying(255) NOT NULL,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE public.conversations OWNER TO akkoma;
--
-- Name: conversations_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.conversations_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.conversations_id_seq OWNER TO akkoma;
--
-- Name: conversations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.conversations_id_seq OWNED BY public.conversations.id;
--
-- Name: counter_cache; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.counter_cache (
id bigint NOT NULL,
instance character varying(255) NOT NULL,
direct bigint DEFAULT 0 NOT NULL,
private bigint DEFAULT 0 NOT NULL,
unlisted bigint DEFAULT 0 NOT NULL,
public bigint DEFAULT 0 NOT NULL
);
ALTER TABLE public.counter_cache OWNER TO akkoma;
--
-- Name: counter_cache_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.counter_cache_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.counter_cache_id_seq OWNER TO akkoma;
--
-- Name: counter_cache_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.counter_cache_id_seq OWNED BY public.counter_cache.id;
--
-- Name: data_migration_failed_ids; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.data_migration_failed_ids (
data_migration_id bigint NOT NULL,
record_id bigint NOT NULL
);
ALTER TABLE public.data_migration_failed_ids OWNER TO akkoma;
--
-- Name: data_migrations; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.data_migrations (
id bigint NOT NULL,
name character varying(255) NOT NULL,
state integer DEFAULT 1,
feature_lock boolean DEFAULT false,
params jsonb DEFAULT '{}'::jsonb,
data jsonb DEFAULT '{}'::jsonb,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE public.data_migrations OWNER TO akkoma;
--
-- Name: data_migrations_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.data_migrations_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.data_migrations_id_seq OWNER TO akkoma;
--
-- Name: data_migrations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.data_migrations_id_seq OWNED BY public.data_migrations.id;
--
-- Name: deliveries; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.deliveries (
id bigint NOT NULL,
object_id integer NOT NULL,
user_id uuid NOT NULL
);
ALTER TABLE public.deliveries OWNER TO akkoma;
--
-- Name: deliveries_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.deliveries_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.deliveries_id_seq OWNER TO akkoma;
--
-- Name: deliveries_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.deliveries_id_seq OWNED BY public.deliveries.id;
--
-- Name: filters; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.filters (
id bigint NOT NULL,
user_id uuid NOT NULL,
filter_id integer NOT NULL,
hide boolean DEFAULT false,
phrase character varying(255),
context character varying(255)[],
expires_at timestamp(0) without time zone,
whole_word boolean DEFAULT true NOT NULL,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE public.filters OWNER TO akkoma;
--
-- Name: filters_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.filters_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.filters_id_seq OWNER TO akkoma;
--
-- Name: filters_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.filters_id_seq OWNED BY public.filters.id;
--
-- Name: following_relationships; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.following_relationships (
id bigint NOT NULL,
follower_id uuid NOT NULL,
following_id uuid NOT NULL,
state integer NOT NULL,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE public.following_relationships OWNER TO akkoma;
--
-- Name: following_relationships_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.following_relationships_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.following_relationships_id_seq OWNER TO akkoma;
--
-- Name: following_relationships_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.following_relationships_id_seq OWNED BY public.following_relationships.id;
--
-- Name: hashtags; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.hashtags (
id bigint NOT NULL,
name text NOT NULL,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE public.hashtags OWNER TO akkoma;
--
-- Name: hashtags_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.hashtags_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.hashtags_id_seq OWNER TO akkoma;
--
-- Name: hashtags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.hashtags_id_seq OWNED BY public.hashtags.id;
--
-- Name: hashtags_objects; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.hashtags_objects (
hashtag_id bigint NOT NULL,
object_id bigint NOT NULL
);
ALTER TABLE public.hashtags_objects OWNER TO akkoma;
--
-- Name: instances; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.instances (
id bigint NOT NULL,
host character varying(255) NOT NULL,
unreachable_since timestamp without time zone,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL,
favicon character varying(255),
favicon_updated_at timestamp(0) without time zone,
nodeinfo jsonb DEFAULT '{}'::jsonb,
metadata_updated_at timestamp(0) without time zone,
has_request_signatures boolean DEFAULT false NOT NULL
);
ALTER TABLE public.instances OWNER TO akkoma;
--
-- Name: instances_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.instances_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.instances_id_seq OWNER TO akkoma;
--
-- Name: instances_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.instances_id_seq OWNED BY public.instances.id;
--
-- Name: lists; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.lists (
id bigint NOT NULL,
user_id uuid NOT NULL,
title character varying(255),
following character varying(255)[],
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL,
ap_id character varying(255)
);
ALTER TABLE public.lists OWNER TO akkoma;
--
-- Name: lists_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.lists_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.lists_id_seq OWNER TO akkoma;
--
-- Name: lists_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.lists_id_seq OWNED BY public.lists.id;
--
-- Name: markers; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.markers (
id bigint NOT NULL,
user_id uuid NOT NULL,
timeline character varying(255) DEFAULT ''::character varying NOT NULL,
last_read_id character varying(255) DEFAULT ''::character varying NOT NULL,
lock_version integer DEFAULT 0 NOT NULL,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE public.markers OWNER TO akkoma;
--
-- Name: markers_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.markers_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.markers_id_seq OWNER TO akkoma;
--
-- Name: markers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.markers_id_seq OWNED BY public.markers.id;
--
-- Name: mfa_tokens; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.mfa_tokens (
id bigint NOT NULL,
user_id uuid,
authorization_id bigint,
token character varying(255),
valid_until timestamp without time zone,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE public.mfa_tokens OWNER TO akkoma;
--
-- Name: mfa_tokens_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.mfa_tokens_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.mfa_tokens_id_seq OWNER TO akkoma;
--
-- Name: mfa_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.mfa_tokens_id_seq OWNED BY public.mfa_tokens.id;
--
-- Name: moderation_log; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.moderation_log (
id bigint NOT NULL,
data jsonb NOT NULL,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE public.moderation_log OWNER TO akkoma;
--
-- Name: moderation_log_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.moderation_log_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.moderation_log_id_seq OWNER TO akkoma;
--
-- Name: moderation_log_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.moderation_log_id_seq OWNED BY public.moderation_log.id;
--
-- Name: notifications; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.notifications (
id bigint NOT NULL,
user_id uuid NOT NULL,
activity_id uuid NOT NULL,
seen boolean DEFAULT false NOT NULL,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL,
type public.notification_type
);
ALTER TABLE public.notifications OWNER TO akkoma;
--
-- Name: notifications_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.notifications_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.notifications_id_seq OWNER TO akkoma;
--
-- Name: notifications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.notifications_id_seq OWNED BY public.notifications.id;
--
-- Name: oauth_authorizations; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.oauth_authorizations (
id bigint NOT NULL,
app_id bigint NOT NULL,
user_id uuid,
token character varying(255) NOT NULL,
valid_until timestamp without time zone,
used boolean DEFAULT false NOT NULL,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL,
scopes character varying(255)[] DEFAULT ARRAY[]::character varying[] NOT NULL
);
ALTER TABLE public.oauth_authorizations OWNER TO akkoma;
--
-- Name: oauth_authorizations_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.oauth_authorizations_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.oauth_authorizations_id_seq OWNER TO akkoma;
--
-- Name: oauth_authorizations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.oauth_authorizations_id_seq OWNED BY public.oauth_authorizations.id;
--
-- Name: oauth_tokens; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.oauth_tokens (
id bigint NOT NULL,
app_id bigint NOT NULL,
user_id uuid,
token character varying(255),
refresh_token character varying(255),
valid_until timestamp without time zone,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL,
scopes character varying(255)[] DEFAULT ARRAY[]::character varying[] NOT NULL
);
ALTER TABLE public.oauth_tokens OWNER TO akkoma;
--
-- Name: oauth_tokens_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.oauth_tokens_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.oauth_tokens_id_seq OWNER TO akkoma;
--
-- Name: oauth_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.oauth_tokens_id_seq OWNED BY public.oauth_tokens.id;
--
-- Name: oban_jobs; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.oban_jobs (
id bigint NOT NULL,
state public.oban_job_state DEFAULT 'available'::public.oban_job_state NOT NULL,
queue text DEFAULT 'default'::text NOT NULL,
worker text NOT NULL,
args jsonb DEFAULT '{}'::jsonb NOT NULL,
errors jsonb[] DEFAULT ARRAY[]::jsonb[] NOT NULL,
attempt integer DEFAULT 0 NOT NULL,
max_attempts integer DEFAULT 20 NOT NULL,
inserted_at timestamp without time zone DEFAULT timezone('UTC'::text, now()) NOT NULL,
scheduled_at timestamp without time zone DEFAULT timezone('UTC'::text, now()) NOT NULL,
attempted_at timestamp without time zone,
completed_at timestamp without time zone,
attempted_by text[],
discarded_at timestamp without time zone,
priority integer DEFAULT 0 NOT NULL,
tags character varying(255)[] DEFAULT ARRAY[]::character varying[],
meta jsonb DEFAULT '{}'::jsonb,
cancelled_at timestamp without time zone,
CONSTRAINT attempt_range CHECK (((attempt >= 0) AND (attempt <= max_attempts))),
CONSTRAINT positive_max_attempts CHECK ((max_attempts > 0)),
CONSTRAINT priority_range CHECK (((priority >= 0) AND (priority <= 3))),
CONSTRAINT queue_length CHECK (((char_length(queue) > 0) AND (char_length(queue) < 128))),
CONSTRAINT worker_length CHECK (((char_length(worker) > 0) AND (char_length(worker) < 128)))
);
ALTER TABLE public.oban_jobs OWNER TO akkoma;
--
-- Name: TABLE oban_jobs; Type: COMMENT; Schema: public; Owner: akkoma
--
COMMENT ON TABLE public.oban_jobs IS '11';
--
-- Name: oban_jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.oban_jobs_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.oban_jobs_id_seq OWNER TO akkoma;
--
-- Name: oban_jobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.oban_jobs_id_seq OWNED BY public.oban_jobs.id;
--
-- Name: oban_peers; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE UNLOGGED TABLE public.oban_peers (
name text NOT NULL,
node text NOT NULL,
started_at timestamp without time zone NOT NULL,
expires_at timestamp without time zone NOT NULL
);
ALTER TABLE public.oban_peers OWNER TO akkoma;
--
-- Name: objects; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.objects (
id bigint NOT NULL,
data jsonb NOT NULL,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE public.objects OWNER TO akkoma;
--
-- Name: objects_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.objects_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.objects_id_seq OWNER TO akkoma;
--
-- Name: objects_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.objects_id_seq OWNED BY public.objects.id;
--
-- Name: password_reset_tokens; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.password_reset_tokens (
id bigint NOT NULL,
token character varying(255) NOT NULL,
user_id uuid NOT NULL,
used boolean DEFAULT false NOT NULL,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE public.password_reset_tokens OWNER TO akkoma;
--
-- Name: password_reset_tokens_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.password_reset_tokens_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.password_reset_tokens_id_seq OWNER TO akkoma;
--
-- Name: password_reset_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.password_reset_tokens_id_seq OWNED BY public.password_reset_tokens.id;
--
-- Name: push_subscriptions; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.push_subscriptions (
id bigint NOT NULL,
user_id uuid NOT NULL,
token_id bigint NOT NULL,
endpoint character varying NOT NULL,
key_p256dh character varying(255) NOT NULL,
key_auth character varying(255) NOT NULL,
data jsonb DEFAULT '{}'::jsonb NOT NULL,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE public.push_subscriptions OWNER TO akkoma;
--
-- Name: push_subscriptions_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.push_subscriptions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.push_subscriptions_id_seq OWNER TO akkoma;
--
-- Name: push_subscriptions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.push_subscriptions_id_seq OWNED BY public.push_subscriptions.id;
--
-- Name: registrations; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.registrations (
id uuid NOT NULL,
user_id uuid,
provider character varying(255) NOT NULL,
uid character varying(255) NOT NULL,
info jsonb DEFAULT '{}'::jsonb NOT NULL,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE public.registrations OWNER TO akkoma;
--
-- Name: report_notes; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.report_notes (
id bigint NOT NULL,
user_id uuid,
activity_id uuid,
content character varying(255),
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE public.report_notes OWNER TO akkoma;
--
-- Name: report_notes_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.report_notes_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.report_notes_id_seq OWNER TO akkoma;
--
-- Name: report_notes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.report_notes_id_seq OWNED BY public.report_notes.id;
--
-- Name: scheduled_activities; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.scheduled_activities (
id bigint NOT NULL,
user_id uuid NOT NULL,
scheduled_at timestamp(0) without time zone NOT NULL,
params jsonb NOT NULL,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE public.scheduled_activities OWNER TO akkoma;
--
-- Name: scheduled_activities_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.scheduled_activities_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.scheduled_activities_id_seq OWNER TO akkoma;
--
-- Name: scheduled_activities_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.scheduled_activities_id_seq OWNED BY public.scheduled_activities.id;
--
-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.schema_migrations (
version bigint NOT NULL,
inserted_at timestamp(0) without time zone
);
ALTER TABLE public.schema_migrations OWNER TO akkoma;
--
-- Name: thread_mutes; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.thread_mutes (
id bigint NOT NULL,
user_id uuid NOT NULL,
context character varying(255) NOT NULL
);
ALTER TABLE public.thread_mutes OWNER TO akkoma;
--
-- Name: thread_mutes_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.thread_mutes_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.thread_mutes_id_seq OWNER TO akkoma;
--
-- Name: thread_mutes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.thread_mutes_id_seq OWNED BY public.thread_mutes.id;
--
-- Name: user_follows_hashtag; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.user_follows_hashtag (
id bigint NOT NULL,
hashtag_id bigint,
user_id uuid
);
ALTER TABLE public.user_follows_hashtag OWNER TO akkoma;
--
-- Name: user_follows_hashtag_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.user_follows_hashtag_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_follows_hashtag_id_seq OWNER TO akkoma;
--
-- Name: user_follows_hashtag_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.user_follows_hashtag_id_seq OWNED BY public.user_follows_hashtag.id;
--
-- Name: user_frontend_setting_profiles; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.user_frontend_setting_profiles (
user_id uuid NOT NULL,
frontend_name character varying(255) NOT NULL,
profile_name character varying(255) NOT NULL,
version integer,
settings jsonb,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE public.user_frontend_setting_profiles OWNER TO akkoma;
--
-- Name: user_invite_tokens; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.user_invite_tokens (
id bigint NOT NULL,
token character varying(255),
used boolean DEFAULT false NOT NULL,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL,
expires_at date,
uses integer DEFAULT 0 NOT NULL,
max_use integer,
invite_type character varying(255) DEFAULT 'one_time'::character varying NOT NULL
);
ALTER TABLE public.user_invite_tokens OWNER TO akkoma;
--
-- Name: user_invite_tokens_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.user_invite_tokens_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_invite_tokens_id_seq OWNER TO akkoma;
--
-- Name: user_invite_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.user_invite_tokens_id_seq OWNED BY public.user_invite_tokens.id;
--
-- Name: user_notes; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.user_notes (
id bigint NOT NULL,
source_id uuid,
target_id uuid,
comment character varying(255),
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE public.user_notes OWNER TO akkoma;
--
-- Name: user_notes_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.user_notes_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_notes_id_seq OWNER TO akkoma;
--
-- Name: user_notes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.user_notes_id_seq OWNED BY public.user_notes.id;
--
-- Name: user_relationships; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.user_relationships (
id bigint NOT NULL,
source_id uuid,
target_id uuid,
relationship_type integer NOT NULL,
inserted_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE public.user_relationships OWNER TO akkoma;
--
-- Name: user_relationships_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.user_relationships_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.user_relationships_id_seq OWNER TO akkoma;
--
-- Name: user_relationships_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.user_relationships_id_seq OWNED BY public.user_relationships.id;
--
-- Name: users; Type: TABLE; Schema: public; Owner: akkoma
--
CREATE TABLE public.users (
id uuid NOT NULL,
email public.citext,
password_hash character varying(255),
name character varying(255),
nickname public.citext,
bio text NOT NULL,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL,
ap_id character varying(255) NOT NULL,
avatar jsonb,
local boolean DEFAULT true NOT NULL,
follower_address character varying(255),
last_refreshed_at timestamp without time zone,
tags character varying(255)[] DEFAULT ARRAY[]::character varying[],
last_digest_emailed_at timestamp(0) without time zone DEFAULT now(),
multi_factor_authentication_settings jsonb DEFAULT '{}'::jsonb,
following_address character varying(255),
keys text,
banner jsonb DEFAULT '{}'::jsonb,
background jsonb DEFAULT '{}'::jsonb,
note_count integer DEFAULT 0 NOT NULL,
follower_count integer DEFAULT 0 NOT NULL,
following_count integer DEFAULT 0 NOT NULL,
is_locked boolean DEFAULT false NOT NULL,
is_confirmed boolean DEFAULT true NOT NULL,
password_reset_pending boolean DEFAULT false NOT NULL,
confirmation_token text,
default_scope character varying(255) DEFAULT 'public'::character varying,
blocks text[] DEFAULT ARRAY[]::text[] NOT NULL,
domain_blocks text[] DEFAULT ARRAY[]::text[] NOT NULL,
mutes text[] DEFAULT ARRAY[]::text[] NOT NULL,
muted_reblogs text[] DEFAULT ARRAY[]::text[] NOT NULL,
muted_notifications text[] DEFAULT ARRAY[]::text[] NOT NULL,
subscribers text[] DEFAULT ARRAY[]::text[] NOT NULL,
is_active boolean DEFAULT true NOT NULL,
no_rich_text boolean DEFAULT false NOT NULL,
ap_enabled boolean DEFAULT false NOT NULL,
is_moderator boolean DEFAULT false NOT NULL,
is_admin boolean DEFAULT false NOT NULL,
show_role boolean DEFAULT true NOT NULL,
mastofe_settings jsonb,
uri text,
hide_followers_count boolean DEFAULT false NOT NULL,
hide_follows_count boolean DEFAULT false NOT NULL,
hide_followers boolean DEFAULT false NOT NULL,
hide_follows boolean DEFAULT false NOT NULL,
hide_favorites boolean DEFAULT true NOT NULL,
email_notifications jsonb DEFAULT '{"digest": false}'::jsonb,
mascot jsonb,
emoji jsonb DEFAULT '{}'::jsonb NOT NULL,
pleroma_settings_store jsonb DEFAULT '{}'::jsonb,
fields jsonb DEFAULT '[]'::jsonb NOT NULL,
raw_fields jsonb DEFAULT '[]'::jsonb NOT NULL,
is_discoverable boolean DEFAULT false NOT NULL,
invisible boolean DEFAULT false NOT NULL,
notification_settings jsonb DEFAULT '{"follows": true, "followers": true, "non_follows": true, "non_followers": true}'::jsonb NOT NULL,
skip_thread_containment boolean DEFAULT false NOT NULL,
also_known_as character varying(255)[] DEFAULT ARRAY[]::character varying[] NOT NULL,
allow_following_move boolean DEFAULT true NOT NULL,
actor_type character varying(255) DEFAULT 'Person'::character varying NOT NULL,
raw_bio text,
public_key text,
inbox text,
shared_inbox text,
accepts_chat_messages boolean,
is_approved boolean DEFAULT true NOT NULL,
registration_reason text,
last_active_at timestamp(0) without time zone,
pinned_objects jsonb DEFAULT '{}'::jsonb NOT NULL,
featured_address character varying(255),
disclose_client boolean DEFAULT true,
is_suggested boolean DEFAULT false NOT NULL,
last_status_at timestamp(0) without time zone,
language character varying(255),
status_ttl_days integer
);
ALTER TABLE public.users OWNER TO akkoma;
--
-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: akkoma
--
CREATE SEQUENCE public.users_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.users_id_seq OWNER TO akkoma;
--
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: akkoma
--
ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
--
-- Name: announcement_read_relationships id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.announcement_read_relationships ALTER COLUMN id SET DEFAULT nextval('public.announcement_read_relationships_id_seq'::regclass);
--
-- Name: apps id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.apps ALTER COLUMN id SET DEFAULT nextval('public.apps_id_seq'::regclass);
--
-- Name: backups id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.backups ALTER COLUMN id SET DEFAULT nextval('public.backups_id_seq'::regclass);
--
-- Name: bookmarks id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.bookmarks ALTER COLUMN id SET DEFAULT nextval('public.bookmarks_id_seq'::regclass);
--
-- Name: config id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.config ALTER COLUMN id SET DEFAULT nextval('public.config_id_seq'::regclass);
--
-- Name: conversation_participation_recipient_ships id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.conversation_participation_recipient_ships ALTER COLUMN id SET DEFAULT nextval('public.conversation_participation_recipient_ships_id_seq'::regclass);
--
-- Name: conversation_participations id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.conversation_participations ALTER COLUMN id SET DEFAULT nextval('public.conversation_participations_id_seq'::regclass);
--
-- Name: conversations id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.conversations ALTER COLUMN id SET DEFAULT nextval('public.conversations_id_seq'::regclass);
--
-- Name: counter_cache id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.counter_cache ALTER COLUMN id SET DEFAULT nextval('public.counter_cache_id_seq'::regclass);
--
-- Name: data_migrations id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.data_migrations ALTER COLUMN id SET DEFAULT nextval('public.data_migrations_id_seq'::regclass);
--
-- Name: deliveries id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.deliveries ALTER COLUMN id SET DEFAULT nextval('public.deliveries_id_seq'::regclass);
--
-- Name: filters id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.filters ALTER COLUMN id SET DEFAULT nextval('public.filters_id_seq'::regclass);
--
-- Name: following_relationships id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.following_relationships ALTER COLUMN id SET DEFAULT nextval('public.following_relationships_id_seq'::regclass);
--
-- Name: hashtags id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.hashtags ALTER COLUMN id SET DEFAULT nextval('public.hashtags_id_seq'::regclass);
--
-- Name: instances id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.instances ALTER COLUMN id SET DEFAULT nextval('public.instances_id_seq'::regclass);
--
-- Name: lists id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.lists ALTER COLUMN id SET DEFAULT nextval('public.lists_id_seq'::regclass);
--
-- Name: markers id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.markers ALTER COLUMN id SET DEFAULT nextval('public.markers_id_seq'::regclass);
--
-- Name: mfa_tokens id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.mfa_tokens ALTER COLUMN id SET DEFAULT nextval('public.mfa_tokens_id_seq'::regclass);
--
-- Name: moderation_log id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.moderation_log ALTER COLUMN id SET DEFAULT nextval('public.moderation_log_id_seq'::regclass);
--
-- Name: notifications id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.notifications ALTER COLUMN id SET DEFAULT nextval('public.notifications_id_seq'::regclass);
--
-- Name: oauth_authorizations id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.oauth_authorizations ALTER COLUMN id SET DEFAULT nextval('public.oauth_authorizations_id_seq'::regclass);
--
-- Name: oauth_tokens id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.oauth_tokens ALTER COLUMN id SET DEFAULT nextval('public.oauth_tokens_id_seq'::regclass);
--
-- Name: oban_jobs id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.oban_jobs ALTER COLUMN id SET DEFAULT nextval('public.oban_jobs_id_seq'::regclass);
--
-- Name: objects id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.objects ALTER COLUMN id SET DEFAULT nextval('public.objects_id_seq'::regclass);
--
-- Name: password_reset_tokens id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.password_reset_tokens ALTER COLUMN id SET DEFAULT nextval('public.password_reset_tokens_id_seq'::regclass);
--
-- Name: push_subscriptions id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.push_subscriptions ALTER COLUMN id SET DEFAULT nextval('public.push_subscriptions_id_seq'::regclass);
--
-- Name: report_notes id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.report_notes ALTER COLUMN id SET DEFAULT nextval('public.report_notes_id_seq'::regclass);
--
-- Name: scheduled_activities id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.scheduled_activities ALTER COLUMN id SET DEFAULT nextval('public.scheduled_activities_id_seq'::regclass);
--
-- Name: thread_mutes id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.thread_mutes ALTER COLUMN id SET DEFAULT nextval('public.thread_mutes_id_seq'::regclass);
--
-- Name: user_follows_hashtag id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.user_follows_hashtag ALTER COLUMN id SET DEFAULT nextval('public.user_follows_hashtag_id_seq'::regclass);
--
-- Name: user_invite_tokens id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.user_invite_tokens ALTER COLUMN id SET DEFAULT nextval('public.user_invite_tokens_id_seq'::regclass);
--
-- Name: user_notes id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.user_notes ALTER COLUMN id SET DEFAULT nextval('public.user_notes_id_seq'::regclass);
--
-- Name: user_relationships id; Type: DEFAULT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.user_relationships ALTER COLUMN id SET DEFAULT nextval('public.user_relationships_id_seq'::regclass);
--
-- Data for Name: activities; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.activities (id, data, inserted_at, updated_at, local, actor, recipients) FROM stdin;
\.
--
-- Data for Name: announcement_read_relationships; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.announcement_read_relationships (id, user_id, announcement_id, inserted_at) FROM stdin;
\.
--
-- Data for Name: announcements; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.announcements (id, data, starts_at, ends_at, rendered, inserted_at, updated_at) FROM stdin;
\.
--
-- Data for Name: apps; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.apps (id, client_name, redirect_uris, scopes, website, client_id, client_secret, inserted_at, updated_at, trusted, user_id) FROM stdin;
\.
--
-- Data for Name: backups; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.backups (id, user_id, file_name, content_type, processed, file_size, inserted_at, updated_at) FROM stdin;
\.
--
-- Data for Name: bookmarks; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.bookmarks (id, user_id, activity_id, inserted_at, updated_at) FROM stdin;
\.
--
-- Data for Name: chat_message_references; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.chat_message_references (id, chat_id, object_id, inserted_at, updated_at, unread) FROM stdin;
\.
--
-- Data for Name: chats; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.chats (id, user_id, recipient, inserted_at, updated_at) FROM stdin;
\.
--
-- Data for Name: config; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.config (id, key, value, inserted_at, updated_at, "group") FROM stdin;
\.
--
-- Data for Name: conversation_participation_recipient_ships; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.conversation_participation_recipient_ships (id, user_id, participation_id) FROM stdin;
\.
--
-- Data for Name: conversation_participations; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.conversation_participations (id, user_id, conversation_id, read, inserted_at, updated_at) FROM stdin;
\.
--
-- Data for Name: conversations; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.conversations (id, ap_id, inserted_at, updated_at) FROM stdin;
\.
--
-- Data for Name: counter_cache; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.counter_cache (id, instance, direct, private, unlisted, public) FROM stdin;
\.
--
-- Data for Name: data_migration_failed_ids; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.data_migration_failed_ids (data_migration_id, record_id) FROM stdin;
\.
--
-- Data for Name: data_migrations; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.data_migrations (id, name, state, feature_lock, params, data, inserted_at, updated_at) FROM stdin;
1 populate_hashtags_table 1 f {} {} 2022-12-19 01:24:22 2022-12-19 01:24:22
\.
--
-- Data for Name: deliveries; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.deliveries (id, object_id, user_id) FROM stdin;
\.
--
-- Data for Name: filters; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.filters (id, user_id, filter_id, hide, phrase, context, expires_at, whole_word, inserted_at, updated_at) FROM stdin;
\.
--
-- Data for Name: following_relationships; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.following_relationships (id, follower_id, following_id, state, inserted_at, updated_at) FROM stdin;
\.
--
-- Data for Name: hashtags; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.hashtags (id, name, inserted_at, updated_at) FROM stdin;
\.
--
-- Data for Name: hashtags_objects; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.hashtags_objects (hashtag_id, object_id) FROM stdin;
\.
--
-- Data for Name: instances; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.instances (id, host, unreachable_since, inserted_at, updated_at, favicon, favicon_updated_at, nodeinfo, metadata_updated_at, has_request_signatures) FROM stdin;
\.
--
-- Data for Name: lists; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.lists (id, user_id, title, following, inserted_at, updated_at, ap_id) FROM stdin;
\.
--
-- Data for Name: markers; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.markers (id, user_id, timeline, last_read_id, lock_version, inserted_at, updated_at) FROM stdin;
\.
--
-- Data for Name: mfa_tokens; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.mfa_tokens (id, user_id, authorization_id, token, valid_until, inserted_at, updated_at) FROM stdin;
\.
--
-- Data for Name: moderation_log; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.moderation_log (id, data, inserted_at, updated_at) FROM stdin;
\.
--
-- Data for Name: notifications; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.notifications (id, user_id, activity_id, seen, inserted_at, updated_at, type) FROM stdin;
\.
--
-- Data for Name: oauth_authorizations; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.oauth_authorizations (id, app_id, user_id, token, valid_until, used, inserted_at, updated_at, scopes) FROM stdin;
\.
--
-- Data for Name: oauth_tokens; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.oauth_tokens (id, app_id, user_id, token, refresh_token, valid_until, inserted_at, updated_at, scopes) FROM stdin;
\.
--
-- Data for Name: oban_jobs; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.oban_jobs (id, state, queue, worker, args, errors, attempt, max_attempts, inserted_at, scheduled_at, attempted_at, completed_at, attempted_by, discarded_at, priority, tags, meta, cancelled_at) FROM stdin;
\.
--
-- Data for Name: oban_peers; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.oban_peers (name, node, started_at, expires_at) FROM stdin;
\.
--
-- Data for Name: objects; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.objects (id, data, inserted_at, updated_at) FROM stdin;
\.
--
-- Data for Name: password_reset_tokens; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.password_reset_tokens (id, token, user_id, used, inserted_at, updated_at) FROM stdin;
\.
--
-- Data for Name: push_subscriptions; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.push_subscriptions (id, user_id, token_id, endpoint, key_p256dh, key_auth, data, inserted_at, updated_at) FROM stdin;
\.
--
-- Data for Name: registrations; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.registrations (id, user_id, provider, uid, info, inserted_at, updated_at) FROM stdin;
\.
--
-- Data for Name: report_notes; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.report_notes (id, user_id, activity_id, content, inserted_at, updated_at) FROM stdin;
\.
--
-- Data for Name: scheduled_activities; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.scheduled_activities (id, user_id, scheduled_at, params, inserted_at, updated_at) FROM stdin;
\.
--
-- Data for Name: schema_migrations; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.schema_migrations (version, inserted_at) FROM stdin;
20170320193800 2022-12-19 01:24:18
20170321074828 2022-12-19 01:24:18
20170321074832 2022-12-19 01:24:18
20170321133335 2022-12-19 01:24:18
20170321143152 2022-12-19 01:24:18
20170330153447 2022-12-19 01:24:18
20170415141210 2022-12-19 01:24:18
20170416122418 2022-12-19 01:24:18
20170418200143 2022-12-19 01:24:18
20170423154511 2022-12-19 01:24:18
20170426154155 2022-12-19 01:24:18
20170427054757 2022-12-19 01:24:18
20170501124823 2022-12-19 01:24:18
20170501133231 2022-12-19 01:24:18
20170502083023 2022-12-19 01:24:18
20170506222027 2022-12-19 01:24:18
20170522160642 2022-12-19 01:24:18
20170529093232 2022-12-19 01:24:19
20170620095947 2022-12-19 01:24:19
20170620133028 2022-12-19 01:24:19
20170620142420 2022-12-19 01:24:19
20170701142005 2022-12-19 01:24:19
20170719152213 2022-12-19 01:24:19
20170906120646 2022-12-19 01:24:19
20170906143140 2022-12-19 01:24:19
20170906152508 2022-12-19 01:24:19
20170911123607 2022-12-19 01:24:19
20170912114248 2022-12-19 01:24:19
20170916090107 2022-12-19 01:24:19
20170917120416 2022-12-19 01:24:19
20171019141706 2022-12-19 01:24:19
20171023155035 2022-12-19 01:24:19
20171024090137 2022-12-19 01:24:19
20171024121413 2022-12-19 01:24:19
20171109091239 2022-12-19 01:24:19
20171109114020 2022-12-19 01:24:19
20171109141309 2022-12-19 01:24:19
20171130135819 2022-12-19 01:24:19
20171212163643 2022-12-19 01:24:19
20171212164525 2022-12-19 01:24:19
20180221210540 2022-12-19 01:24:19
20180325172351 2022-12-19 01:24:19
20180327174350 2022-12-19 01:24:19
20180327175831 2022-12-19 01:24:19
20180429094642 2022-12-19 01:24:19
20180513104714 2022-12-19 01:24:19
20180516144508 2022-12-19 01:24:19
20180516154905 2022-12-19 01:24:19
20180530123448 2022-12-19 01:24:19
20180606173637 2022-12-19 01:24:19
20180612110515 2022-12-19 01:24:19
20180617221540 2022-12-19 01:24:19
20180813003722 2022-12-19 01:24:19
20180829082446 2022-12-19 01:24:19
20180829182612 2022-12-19 01:24:19
20180829183529 2022-12-19 01:24:19
20180903114437 2022-12-19 01:24:19
20180918182427 2022-12-19 01:24:19
20180919060348 2022-12-19 01:24:19
20181201104428 2022-12-19 01:24:19
20181201105617 2022-12-19 01:24:19
20181206125616 2022-12-19 01:24:19
20181214121049 2022-12-19 01:24:19
20181218172826 2022-12-19 01:24:19
20190109152453 2022-12-19 01:24:20
20190115085500 2022-12-19 01:24:20
20190118074940 2022-12-19 01:24:20
20190122153157 2022-12-19 01:24:20
20190123092341 2022-12-19 01:24:20
20190123125546 2022-12-19 01:24:20
20190123125839 2022-12-19 01:24:20
20190124131141 2022-12-19 01:24:20
20190126160540 2022-12-19 01:24:20
20190127151220 2022-12-19 01:24:20
20190203185340 2022-12-19 01:24:20
20190204200237 2022-12-19 01:24:20
20190205114625 2022-12-19 01:24:20
20190208131753 2022-12-19 01:24:20
20190213185503 2022-12-19 01:24:20
20190213185600 2022-12-19 01:24:20
20190222104808 2022-12-19 01:24:20
20190301101154 2022-12-19 01:24:20
20190303120636 2022-12-19 01:24:20
20190315101315 2022-12-19 01:24:20
20190325185009 2022-12-19 01:24:20
20190328053912 2022-12-19 01:24:20
20190403131720 2022-12-19 01:24:20
20190404050946 2022-12-19 01:24:20
20190405160700 2022-12-19 01:24:20
20190408123347 2022-12-19 01:24:20
20190410152859 2022-12-19 01:24:20
20190411094120 2022-12-19 01:24:20
20190412052952 2022-12-19 01:24:20
20190413082658 2022-12-19 01:24:20
20190413085040 2022-12-19 01:24:20
20190414125034 2022-12-19 01:24:20
20190501125843 2022-12-19 01:24:20
20190501133552 2022-12-19 01:24:20
20190506054542 2022-12-19 01:24:20
20190508193213 2022-12-19 01:24:20
20190511191044 2022-12-19 01:24:20
20190513175809 2022-12-19 01:24:20
20190515222404 2022-12-19 01:24:20
20190516112144 2022-12-19 01:24:20
20190518032627 2022-12-19 01:24:20
20190525071417 2022-12-19 01:24:20
20190603115238 2022-12-19 01:24:20
20190603162018 2022-12-19 01:24:20
20190603173419 2022-12-19 01:24:20
20190622151019 2022-12-19 01:24:20
20190710115833 2022-12-19 01:24:20
20190710125051 2022-12-19 01:24:20
20190710125158 2022-12-19 01:24:20
20190711042021 2022-12-19 01:24:20
20190711042024 2022-12-19 01:24:20
20190716100804 2022-12-19 01:24:20
20190730055101 2022-12-19 01:24:20
20190801154554 2022-12-19 01:24:20
20190818124341 2022-12-19 01:24:20
20190823000549 2022-12-19 01:24:20
20190912065617 2022-12-19 01:24:20
20190917100019 2022-12-19 01:24:20
20190929201536 2022-12-19 01:24:20
20191005165212 2022-12-19 01:24:20
20191006123824 2022-12-19 01:24:20
20191006135457 2022-12-19 01:24:20
20191007073319 2022-12-19 01:24:20
20191008132217 2022-12-19 01:24:20
20191008132427 2022-12-19 01:24:20
20191009154606 2022-12-19 01:24:20
20191009154608 2022-12-19 01:24:21
20191014181019 2022-12-19 01:24:21
20191017225002 2022-12-19 01:24:21
20191025081729 2022-12-19 01:24:21
20191025143434 2022-12-19 01:24:21
20191026190317 2022-12-19 01:24:21
20191026190415 2022-12-19 01:24:21
20191026190500 2022-12-19 01:24:21
20191026190533 2022-12-19 01:24:21
20191026190622 2022-12-19 01:24:21
20191026190712 2022-12-19 01:24:21
20191026190759 2022-12-19 01:24:21
20191026190841 2022-12-19 01:24:21
20191026191023 2022-12-19 01:24:21
20191026191100 2022-12-19 01:24:21
20191026191134 2022-12-19 01:24:21
20191026191218 2022-12-19 01:24:21
20191026191249 2022-12-19 01:24:21
20191026191328 2022-12-19 01:24:21
20191026191401 2022-12-19 01:24:21
20191026191442 2022-12-19 01:24:21
20191026191524 2022-12-19 01:24:21
20191026191603 2022-12-19 01:24:21
20191026191635 2022-12-19 01:24:21
20191026191711 2022-12-19 01:24:21
20191026191753 2022-12-19 01:24:21
20191026191826 2022-12-19 01:24:21
20191026191910 2022-12-19 01:24:21
20191029101340 2022-12-19 01:24:21
20191029172832 2022-12-19 01:24:21
20191104133100 2022-12-19 01:24:21
20191118084425 2022-12-19 01:24:21
20191118084500 2022-12-19 01:24:21
20191123030554 2022-12-19 01:24:21
20191123103423 2022-12-19 01:24:21
20191128153944 2022-12-19 01:24:21
20191203043610 2022-12-19 01:24:21
20191220174645 2022-12-19 01:24:21
20200109123126 2022-12-19 01:24:21
20200227122417 2022-12-19 01:24:21
20200307103755 2022-12-19 01:24:21
20200309123730 2022-12-19 01:24:21
20200314123607 2022-12-19 01:24:21
20200315125756 2022-12-19 01:24:21
20200322174133 2022-12-19 01:24:21
20200323122421 2022-12-19 01:24:21
20200328124805 2022-12-19 01:24:21
20200328130139 2022-12-19 01:24:21
20200328193433 2022-12-19 01:24:21
20200401030751 2022-12-19 01:24:21
20200401072456 2022-12-19 01:24:21
20200402063221 2022-12-19 01:24:21
20200406100225 2022-12-19 01:24:21
20200406105422 2022-12-19 01:24:21
20200415181818 2022-12-19 01:24:21
20200428221338 2022-12-19 01:24:21
20200505072231 2022-12-19 01:24:21
20200508092434 2022-12-19 01:24:21
20200831152600 2022-12-19 01:24:21
20200831192323 2022-12-19 01:24:21
20200901061256 2022-12-19 01:24:21
20200901061637 2022-12-19 01:24:21
20200905082737 2022-12-19 01:24:21
20200905091427 2022-12-19 01:24:21
20200906072147 2022-12-19 01:24:21
20200907084956 2022-12-19 01:24:21
20200907092050 2022-12-19 01:24:22
20200910113106 2022-12-19 01:24:22
20200911055909 2022-12-19 01:24:22
20200914105638 2022-12-19 01:24:22
20200914105800 2022-12-19 01:24:22
20200915095704 2022-12-19 01:24:22
20200919182636 2022-12-19 01:24:22
20200925065249 2022-12-19 01:24:22
20200928145912 2022-12-19 01:24:22
20200930082320 2022-12-19 01:24:22
20201005123100 2022-12-19 01:24:22
20201005124600 2022-12-19 01:24:22
20201005132900 2022-12-19 01:24:22
20201012173004 2022-12-19 01:24:22
20201013141127 2022-12-19 01:24:22
20201013144052 2022-12-19 01:24:22
20201013184200 2022-12-19 01:24:22
20201016205220 2022-12-19 01:24:22
20201113060459 2022-12-19 01:24:22
20201217172858 2022-12-19 01:24:22
20201221202251 2022-12-19 01:24:22
20201221202252 2022-12-19 01:24:22
20201221203824 2022-12-19 01:24:22
20201231185546 2022-12-19 01:24:22
20210105195018 2022-12-19 01:24:22
20210106183301 2022-12-19 01:24:22
20210111172254 2022-12-19 01:24:22
20210113225652 2022-12-19 01:24:22
20210115205649 2022-12-19 01:24:22
20210121080964 2022-12-19 01:24:22
20210122151424 2022-12-19 01:24:22
20210128092834 2022-12-19 01:24:22
20210202110641 2022-12-19 01:24:22
20210203141144 2022-12-19 01:24:22
20210205145000 2022-12-19 01:24:22
20210206045221 2022-12-19 01:24:22
20210218223811 2022-12-19 01:24:22
20210222183840 2022-12-19 01:24:22
20210222184616 2022-12-19 01:24:22
20210401143153 2022-12-19 01:24:22
20210420204354 2022-12-19 01:24:22
20220605185734 2022-12-19 01:24:22
20220718102634 2022-12-19 01:24:22
20220805123645 2022-12-19 01:24:22
20220831170605 2022-12-19 01:24:22
20220905011454 2022-12-19 01:24:22
20220911195347 2022-12-19 01:24:22
20220916115149 2022-12-19 01:24:22
20221020135943 2022-12-19 01:24:22
20221123221956 2022-12-19 01:24:22
20221128103145 2022-12-19 01:24:22
20221129105331 2022-12-19 01:24:22
20221129110627 2022-12-19 01:24:22
20221129110727 2022-12-19 01:24:22
20221129112022 2022-12-19 01:24:22
20221203232118 2022-12-19 01:24:22
20221211234352 2022-12-19 01:24:22
20200520155351 2022-12-19 01:24:21
20200526144426 2022-12-19 01:24:21
20200527104138 2022-12-19 01:24:21
20200527163635 2022-12-19 01:24:21
20200602094828 2022-12-19 01:24:21
20200602125218 2022-12-19 01:24:21
20200602150528 2022-12-19 01:24:21
20200603105113 2022-12-19 01:24:21
20200603120448 2022-12-19 01:24:21
20200603122732 2022-12-19 01:24:21
20200604150318 2022-12-19 01:24:21
20200606105430 2022-12-19 01:24:21
20200607112923 2022-12-19 01:24:21
20200626163359 2022-12-19 01:24:21
20200630162024 2022-12-19 01:24:21
20200703101031 2022-12-19 01:24:21
20200706060258 2022-12-19 01:24:21
20200707112859 2022-12-19 01:24:21
20200708193702 2022-12-19 01:24:21
20200712234852 2022-12-19 01:24:21
20200714081657 2022-12-19 01:24:21
20200716195806 2022-12-19 01:24:21
20200722185515 2022-12-19 01:24:21
20200724133313 2022-12-19 01:24:21
20200802170532 2022-12-19 01:24:21
20200804180322 2022-12-19 01:24:21
20200804183107 2022-12-19 01:24:21
20200806175913 2022-12-19 01:24:21
20200808173046 2022-12-19 01:24:21
20200811125613 2022-12-19 01:24:21
20200811143147 2022-12-19 01:24:21
20200817120935 2022-12-19 01:24:21
20200824115541 2022-12-19 01:24:21
20200825061316 2022-12-19 01:24:21
20200825093037 2022-12-19 01:24:21
20200831114918 2022-12-19 01:24:21
20200831115854 2022-12-19 01:24:21
20200831142509 2022-12-19 01:24:21
20210717000000 2022-12-19 01:24:22
20210818023112 2022-12-19 01:24:22
20211121000000 2022-12-19 01:24:22
20211125110126 2022-12-19 01:24:22
20211126191138 2022-12-19 01:24:22
20211222165256 2022-12-19 01:24:22
20211225154802 2022-12-19 01:24:22
20211229075801 2022-12-19 01:24:22
20220108213213 2022-12-19 01:24:22
20220302013920 2022-12-19 01:24:22
20220308012601 2022-12-19 01:24:22
20220506175506 2022-12-19 01:24:22
20220509180452 2022-12-19 01:24:22
\.
--
-- Data for Name: thread_mutes; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.thread_mutes (id, user_id, context) FROM stdin;
\.
--
-- Data for Name: user_follows_hashtag; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.user_follows_hashtag (id, hashtag_id, user_id) FROM stdin;
\.
--
-- Data for Name: user_frontend_setting_profiles; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.user_frontend_setting_profiles (user_id, frontend_name, profile_name, version, settings, inserted_at, updated_at) FROM stdin;
\.
--
-- Data for Name: user_invite_tokens; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.user_invite_tokens (id, token, used, inserted_at, updated_at, expires_at, uses, max_use, invite_type) FROM stdin;
\.
--
-- Data for Name: user_notes; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.user_notes (id, source_id, target_id, comment, inserted_at, updated_at) FROM stdin;
\.
--
-- Data for Name: user_relationships; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.user_relationships (id, source_id, target_id, relationship_type, inserted_at) FROM stdin;
\.
--
-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: akkoma
--
COPY public.users (id, email, password_hash, name, nickname, bio, inserted_at, updated_at, ap_id, avatar, local, follower_address, last_refreshed_at, tags, last_digest_emailed_at, multi_factor_authentication_settings, following_address, keys, banner, background, note_count, follower_count, following_count, is_locked, is_confirmed, password_reset_pending, confirmation_token, default_scope, blocks, domain_blocks, mutes, muted_reblogs, muted_notifications, subscribers, is_active, no_rich_text, ap_enabled, is_moderator, is_admin, show_role, mastofe_settings, uri, hide_followers_count, hide_follows_count, hide_followers, hide_follows, hide_favorites, email_notifications, mascot, emoji, pleroma_settings_store, fields, raw_fields, is_discoverable, invisible, notification_settings, skip_thread_containment, also_known_as, allow_following_move, actor_type, raw_bio, public_key, inbox, shared_inbox, accepts_chat_messages, is_approved, registration_reason, last_active_at, pinned_objects, featured_address, disclose_client, is_suggested, last_status_at, language, status_ttl_days) FROM stdin;
\.
--
-- Name: activities_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.activities_id_seq', 1, false);
--
-- Name: announcement_read_relationships_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.announcement_read_relationships_id_seq', 1, false);
--
-- Name: apps_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.apps_id_seq', 1, false);
--
-- Name: backups_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.backups_id_seq', 1, false);
--
-- Name: bookmarks_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.bookmarks_id_seq', 1, false);
--
-- Name: chats_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.chats_id_seq', 1, false);
--
-- Name: config_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.config_id_seq', 1, false);
--
-- Name: conversation_participation_recipient_ships_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.conversation_participation_recipient_ships_id_seq', 1, false);
--
-- Name: conversation_participations_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.conversation_participations_id_seq', 1, false);
--
-- Name: conversations_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.conversations_id_seq', 1, false);
--
-- Name: counter_cache_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.counter_cache_id_seq', 1, false);
--
-- Name: data_migrations_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.data_migrations_id_seq', 1, true);
--
-- Name: deliveries_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.deliveries_id_seq', 1, false);
--
-- Name: filters_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.filters_id_seq', 1, false);
--
-- Name: following_relationships_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.following_relationships_id_seq', 1, false);
--
-- Name: hashtags_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.hashtags_id_seq', 1, false);
--
-- Name: instances_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.instances_id_seq', 1, false);
--
-- Name: lists_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.lists_id_seq', 1, false);
--
-- Name: markers_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.markers_id_seq', 1, false);
--
-- Name: mfa_tokens_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.mfa_tokens_id_seq', 1, false);
--
-- Name: moderation_log_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.moderation_log_id_seq', 1, false);
--
-- Name: notifications_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.notifications_id_seq', 1, false);
--
-- Name: oauth_authorizations_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.oauth_authorizations_id_seq', 1, false);
--
-- Name: oauth_tokens_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.oauth_tokens_id_seq', 1, false);
--
-- Name: oban_jobs_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.oban_jobs_id_seq', 1, false);
--
-- Name: objects_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.objects_id_seq', 1, false);
--
-- Name: password_reset_tokens_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.password_reset_tokens_id_seq', 1, false);
--
-- Name: push_subscriptions_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.push_subscriptions_id_seq', 1, false);
--
-- Name: report_notes_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.report_notes_id_seq', 1, false);
--
-- Name: scheduled_activities_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.scheduled_activities_id_seq', 1, false);
--
-- Name: thread_mutes_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.thread_mutes_id_seq', 1, false);
--
-- Name: user_follows_hashtag_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.user_follows_hashtag_id_seq', 1, false);
--
-- Name: user_invite_tokens_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.user_invite_tokens_id_seq', 1, false);
--
-- Name: user_notes_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.user_notes_id_seq', 1, false);
--
-- Name: user_relationships_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.user_relationships_id_seq', 1, false);
--
-- Name: users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: akkoma
--
SELECT pg_catalog.setval('public.users_id_seq', 1, false);
--
-- Name: activities activities_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.activities
ADD CONSTRAINT activities_pkey PRIMARY KEY (id);
--
-- Name: announcement_read_relationships announcement_read_relationships_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.announcement_read_relationships
ADD CONSTRAINT announcement_read_relationships_pkey PRIMARY KEY (id);
--
-- Name: announcements announcements_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.announcements
ADD CONSTRAINT announcements_pkey PRIMARY KEY (id);
--
-- Name: apps apps_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.apps
ADD CONSTRAINT apps_pkey PRIMARY KEY (id);
--
-- Name: backups backups_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.backups
ADD CONSTRAINT backups_pkey PRIMARY KEY (id);
--
-- Name: bookmarks bookmarks_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.bookmarks
ADD CONSTRAINT bookmarks_pkey PRIMARY KEY (id);
--
-- Name: chat_message_references chat_message_references_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.chat_message_references
ADD CONSTRAINT chat_message_references_pkey PRIMARY KEY (id);
--
-- Name: chats chats_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.chats
ADD CONSTRAINT chats_pkey PRIMARY KEY (id);
--
-- Name: config config_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.config
ADD CONSTRAINT config_pkey PRIMARY KEY (id);
--
-- Name: conversation_participation_recipient_ships conversation_participation_recipient_ships_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.conversation_participation_recipient_ships
ADD CONSTRAINT conversation_participation_recipient_ships_pkey PRIMARY KEY (id);
--
-- Name: conversation_participations conversation_participations_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.conversation_participations
ADD CONSTRAINT conversation_participations_pkey PRIMARY KEY (id);
--
-- Name: conversations conversations_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.conversations
ADD CONSTRAINT conversations_pkey PRIMARY KEY (id);
--
-- Name: counter_cache counter_cache_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.counter_cache
ADD CONSTRAINT counter_cache_pkey PRIMARY KEY (id);
--
-- Name: data_migration_failed_ids data_migration_failed_ids_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.data_migration_failed_ids
ADD CONSTRAINT data_migration_failed_ids_pkey PRIMARY KEY (data_migration_id, record_id);
--
-- Name: data_migrations data_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.data_migrations
ADD CONSTRAINT data_migrations_pkey PRIMARY KEY (id);
--
-- Name: deliveries deliveries_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.deliveries
ADD CONSTRAINT deliveries_pkey PRIMARY KEY (id);
--
-- Name: filters filters_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.filters
ADD CONSTRAINT filters_pkey PRIMARY KEY (id);
--
-- Name: following_relationships following_relationships_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.following_relationships
ADD CONSTRAINT following_relationships_pkey PRIMARY KEY (id);
--
-- Name: hashtags_objects hashtags_objects_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.hashtags_objects
ADD CONSTRAINT hashtags_objects_pkey PRIMARY KEY (hashtag_id, object_id);
--
-- Name: hashtags hashtags_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.hashtags
ADD CONSTRAINT hashtags_pkey PRIMARY KEY (id);
--
-- Name: instances instances_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.instances
ADD CONSTRAINT instances_pkey PRIMARY KEY (id);
--
-- Name: lists lists_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.lists
ADD CONSTRAINT lists_pkey PRIMARY KEY (id);
--
-- Name: markers markers_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.markers
ADD CONSTRAINT markers_pkey PRIMARY KEY (id);
--
-- Name: mfa_tokens mfa_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.mfa_tokens
ADD CONSTRAINT mfa_tokens_pkey PRIMARY KEY (id);
--
-- Name: moderation_log moderation_log_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.moderation_log
ADD CONSTRAINT moderation_log_pkey PRIMARY KEY (id);
--
-- Name: notifications notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.notifications
ADD CONSTRAINT notifications_pkey PRIMARY KEY (id);
--
-- Name: oauth_authorizations oauth_authorizations_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.oauth_authorizations
ADD CONSTRAINT oauth_authorizations_pkey PRIMARY KEY (id);
--
-- Name: oauth_tokens oauth_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.oauth_tokens
ADD CONSTRAINT oauth_tokens_pkey PRIMARY KEY (id);
--
-- Name: oban_jobs oban_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.oban_jobs
ADD CONSTRAINT oban_jobs_pkey PRIMARY KEY (id);
--
-- Name: oban_peers oban_peers_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.oban_peers
ADD CONSTRAINT oban_peers_pkey PRIMARY KEY (name);
--
-- Name: objects objects_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.objects
ADD CONSTRAINT objects_pkey PRIMARY KEY (id);
--
-- Name: password_reset_tokens password_reset_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.password_reset_tokens
ADD CONSTRAINT password_reset_tokens_pkey PRIMARY KEY (id);
--
-- Name: push_subscriptions push_subscriptions_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.push_subscriptions
ADD CONSTRAINT push_subscriptions_pkey PRIMARY KEY (id);
--
-- Name: registrations registrations_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.registrations
ADD CONSTRAINT registrations_pkey PRIMARY KEY (id);
--
-- Name: report_notes report_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.report_notes
ADD CONSTRAINT report_notes_pkey PRIMARY KEY (id);
--
-- Name: scheduled_activities scheduled_activities_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.scheduled_activities
ADD CONSTRAINT scheduled_activities_pkey PRIMARY KEY (id);
--
-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.schema_migrations
ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);
--
-- Name: thread_mutes thread_mutes_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.thread_mutes
ADD CONSTRAINT thread_mutes_pkey PRIMARY KEY (id);
--
-- Name: user_follows_hashtag user_follows_hashtag_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.user_follows_hashtag
ADD CONSTRAINT user_follows_hashtag_pkey PRIMARY KEY (id);
--
-- Name: user_frontend_setting_profiles user_frontend_setting_profiles_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.user_frontend_setting_profiles
ADD CONSTRAINT user_frontend_setting_profiles_pkey PRIMARY KEY (user_id, frontend_name, profile_name);
--
-- Name: user_invite_tokens user_invite_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.user_invite_tokens
ADD CONSTRAINT user_invite_tokens_pkey PRIMARY KEY (id);
--
-- Name: user_notes user_notes_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.user_notes
ADD CONSTRAINT user_notes_pkey PRIMARY KEY (id);
--
-- Name: user_relationships user_relationships_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.user_relationships
ADD CONSTRAINT user_relationships_pkey PRIMARY KEY (id);
--
-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.users
ADD CONSTRAINT users_pkey PRIMARY KEY (id);
--
-- Name: activities_actor_id_DESC_NULLS_LAST_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX "activities_actor_id_DESC_NULLS_LAST_index" ON public.activities USING btree (actor, id DESC NULLS LAST);
--
-- Name: activities_cc_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX activities_cc_index ON public.activities USING gin (((data -> 'cc'::text)));
--
-- Name: activities_context_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX activities_context_index ON public.activities USING btree (((data ->> 'type'::text)), ((data ->> 'context'::text)));
--
-- Name: activities_create_objects_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX activities_create_objects_index ON public.activities USING btree (COALESCE(((data -> 'object'::text) ->> 'id'::text), (data ->> 'object'::text)));
--
-- Name: activities_hosts; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX activities_hosts ON public.activities USING btree (split_part((actor)::text, '/'::text, 3));
--
-- Name: activities_id_desc_nulls_last_local_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX activities_id_desc_nulls_last_local_index ON public.activities USING btree (id DESC NULLS LAST, local);
--
-- Name: activities_in_reply_to; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX activities_in_reply_to ON public.activities USING btree ((((data -> 'object'::text) ->> 'inReplyTo'::text)));
--
-- Name: activities_likes; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX activities_likes ON public.activities USING gin (((data #> '{object,likes}'::text[])));
--
-- Name: activities_local_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX activities_local_index ON public.activities USING btree (local);
--
-- Name: activities_recipients_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX activities_recipients_index ON public.activities USING gin (recipients);
--
-- Name: activities_to_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX activities_to_index ON public.activities USING gin (((data -> 'to'::text)));
--
-- Name: activities_unique_apid_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX activities_unique_apid_index ON public.activities USING btree (((data ->> 'id'::text)));
--
-- Name: activities_visibility_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX activities_visibility_index ON public.activities USING btree (public.activity_visibility(actor, recipients, data), id DESC NULLS LAST) WHERE ((data ->> 'type'::text) = 'Create'::text);
--
-- Name: announcement_read_relationships_user_id_announcement_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX announcement_read_relationships_user_id_announcement_id_index ON public.announcement_read_relationships USING btree (user_id, announcement_id);
--
-- Name: apps_client_id_client_secret_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX apps_client_id_client_secret_index ON public.apps USING btree (client_id, client_secret);
--
-- Name: apps_client_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX apps_client_id_index ON public.apps USING btree (client_id);
--
-- Name: apps_user_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX apps_user_id_index ON public.apps USING btree (user_id);
--
-- Name: backups_user_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX backups_user_id_index ON public.backups USING btree (user_id);
--
-- Name: bookmarks_activity_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX bookmarks_activity_id_index ON public.bookmarks USING btree (activity_id);
--
-- Name: bookmarks_user_id_activity_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX bookmarks_user_id_activity_id_index ON public.bookmarks USING btree (user_id, activity_id);
--
-- Name: chat_message_references_chat_id_id_desc_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX chat_message_references_chat_id_id_desc_index ON public.chat_message_references USING btree (chat_id, id DESC);
--
-- Name: chat_message_references_object_id_chat_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX chat_message_references_object_id_chat_id_index ON public.chat_message_references USING btree (object_id, chat_id);
--
-- Name: chats_user_id_recipient_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX chats_user_id_recipient_index ON public.chats USING btree (user_id, recipient);
--
-- Name: config_group_key_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX config_group_key_index ON public.config USING btree ("group", key);
--
-- Name: conversation_participation_recipient_ships_participation_id_ind; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX conversation_participation_recipient_ships_participation_id_ind ON public.conversation_participation_recipient_ships USING btree (participation_id);
--
-- Name: conversation_participation_recipient_ships_user_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX conversation_participation_recipient_ships_user_id_index ON public.conversation_participation_recipient_ships USING btree (user_id);
--
-- Name: conversation_participations_conversation_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX conversation_participations_conversation_id_index ON public.conversation_participations USING btree (conversation_id);
--
-- Name: conversation_participations_updated_at_desc_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX conversation_participations_updated_at_desc_index ON public.conversation_participations USING btree (updated_at DESC);
--
-- Name: conversation_participations_user_id_conversation_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX conversation_participations_user_id_conversation_id_index ON public.conversation_participations USING btree (user_id, conversation_id);
--
-- Name: conversations_ap_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX conversations_ap_id_index ON public.conversations USING btree (ap_id);
--
-- Name: counter_cache_instance_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX counter_cache_instance_index ON public.counter_cache USING btree (instance);
--
-- Name: data_migration_failed_ids_data_migration_id_record_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX data_migration_failed_ids_data_migration_id_record_id_index ON public.data_migration_failed_ids USING btree (data_migration_id, record_id);
--
-- Name: data_migrations_name_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX data_migrations_name_index ON public.data_migrations USING btree (name);
--
-- Name: deliveries_object_id; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX deliveries_object_id ON public.deliveries USING btree (object_id);
--
-- Name: deliveries_user_id_object_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX deliveries_user_id_object_id_index ON public.deliveries USING btree (user_id, object_id);
--
-- Name: filters_user_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX filters_user_id_index ON public.filters USING btree (user_id);
--
-- Name: following_relationships_follower_id_following_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX following_relationships_follower_id_following_id_index ON public.following_relationships USING btree (follower_id, following_id);
--
-- Name: following_relationships_follower_id_state_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX following_relationships_follower_id_state_index ON public.following_relationships USING btree (follower_id, state);
--
-- Name: following_relationships_following_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX following_relationships_following_id_index ON public.following_relationships USING btree (following_id);
--
-- Name: hashtags_name_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX hashtags_name_index ON public.hashtags USING btree (name);
--
-- Name: hashtags_objects_object_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX hashtags_objects_object_id_index ON public.hashtags_objects USING btree (object_id);
--
-- Name: hided_phrases_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX hided_phrases_index ON public.filters USING btree (phrase) WHERE (hide = true);
--
-- Name: instances_host_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX instances_host_index ON public.instances USING btree (host);
--
-- Name: instances_unreachable_since_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX instances_unreachable_since_index ON public.instances USING btree (unreachable_since);
--
-- Name: lists_ap_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX lists_ap_id_index ON public.lists USING btree (ap_id);
--
-- Name: lists_following_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX lists_following_index ON public.lists USING btree (following);
--
-- Name: lists_user_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX lists_user_id_index ON public.lists USING btree (user_id);
--
-- Name: markers_user_id_timeline_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX markers_user_id_timeline_index ON public.markers USING btree (user_id, timeline);
--
-- Name: mfa_tokens_token_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX mfa_tokens_token_index ON public.mfa_tokens USING btree (token);
--
-- Name: notifications_activity_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX notifications_activity_id_index ON public.notifications USING btree (activity_id);
--
-- Name: notifications_id_desc_nulls_last_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX notifications_id_desc_nulls_last_index ON public.notifications USING btree (id DESC NULLS LAST);
--
-- Name: notifications_user_id_id_desc_nulls_last_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX notifications_user_id_id_desc_nulls_last_index ON public.notifications USING btree (user_id, id DESC NULLS LAST);
--
-- Name: notifications_user_id_seen_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX notifications_user_id_seen_index ON public.notifications USING btree (user_id, seen);
--
-- Name: oauth_tokens_app_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX oauth_tokens_app_id_index ON public.oauth_tokens USING btree (app_id);
--
-- Name: oauth_tokens_refresh_token_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX oauth_tokens_refresh_token_index ON public.oauth_tokens USING btree (refresh_token);
--
-- Name: oauth_tokens_token_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX oauth_tokens_token_index ON public.oauth_tokens USING btree (token);
--
-- Name: oauth_tokens_user_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX oauth_tokens_user_id_index ON public.oauth_tokens USING btree (user_id);
--
-- Name: oban_jobs_args_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX oban_jobs_args_index ON public.oban_jobs USING gin (args);
--
-- Name: oban_jobs_meta_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX oban_jobs_meta_index ON public.oban_jobs USING gin (meta);
--
-- Name: oban_jobs_state_queue_priority_scheduled_at_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX oban_jobs_state_queue_priority_scheduled_at_id_index ON public.oban_jobs USING btree (state, queue, priority, scheduled_at, id);
--
-- Name: objects_actor_type; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX objects_actor_type ON public.objects USING btree (((data ->> 'actor'::text)), ((data ->> 'type'::text)));
--
-- Name: objects_fts; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX objects_fts ON public.objects USING gin (to_tsvector('english'::regconfig, (data ->> 'content'::text)));
--
-- Name: objects_in_reply_to_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX objects_in_reply_to_index ON public.objects USING btree (((data ->> 'inReplyTo'::text)));
--
-- Name: objects_likes; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX objects_likes ON public.objects USING gin (((data -> 'likes'::text)));
--
-- Name: objects_unique_apid_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX objects_unique_apid_index ON public.objects USING btree (((data ->> 'id'::text)));
--
-- Name: push_subscriptions_user_id_token_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX push_subscriptions_user_id_token_id_index ON public.push_subscriptions USING btree (user_id, token_id);
--
-- Name: registrations_provider_uid_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX registrations_provider_uid_index ON public.registrations USING btree (provider, uid);
--
-- Name: registrations_user_id_provider_uid_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX registrations_user_id_provider_uid_index ON public.registrations USING btree (user_id, provider, uid);
--
-- Name: report_notes_activity_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX report_notes_activity_id_index ON public.report_notes USING btree (activity_id);
--
-- Name: scheduled_activities_scheduled_at_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX scheduled_activities_scheduled_at_index ON public.scheduled_activities USING btree (scheduled_at);
--
-- Name: scheduled_activities_user_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX scheduled_activities_user_id_index ON public.scheduled_activities USING btree (user_id);
--
-- Name: unique_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX unique_index ON public.thread_mutes USING btree (user_id, context);
--
-- Name: unread_conversation_participation_count_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX unread_conversation_participation_count_index ON public.conversation_participations USING btree (user_id) WHERE (read = false);
--
-- Name: unread_messages_count_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX unread_messages_count_index ON public.chat_message_references USING btree (chat_id) WHERE (unread = true);
--
-- Name: user_follows_hashtag_user_id_hashtag_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX user_follows_hashtag_user_id_hashtag_id_index ON public.user_follows_hashtag USING btree (user_id, hashtag_id);
--
-- Name: user_frontend_setting_profiles_user_id_frontend_name_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX user_frontend_setting_profiles_user_id_frontend_name_index ON public.user_frontend_setting_profiles USING btree (user_id, frontend_name);
--
-- Name: user_frontend_setting_profiles_user_id_frontend_name_profile_na; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX user_frontend_setting_profiles_user_id_frontend_name_profile_na ON public.user_frontend_setting_profiles USING btree (user_id, frontend_name, profile_name);
--
-- Name: user_notes_source_id_target_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX user_notes_source_id_target_id_index ON public.user_notes USING btree (source_id, target_id);
--
-- Name: user_relationships_source_id_relationship_type_target_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX user_relationships_source_id_relationship_type_target_id_index ON public.user_relationships USING btree (source_id, relationship_type, target_id);
--
-- Name: user_relationships_target_id_relationship_type_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX user_relationships_target_id_relationship_type_index ON public.user_relationships USING btree (target_id, relationship_type);
--
-- Name: users_ap_id_COALESCE_follower_address_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX "users_ap_id_COALESCE_follower_address_index" ON public.users USING btree (ap_id, COALESCE(follower_address, ''::character varying));
--
-- Name: users_ap_id_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX users_ap_id_index ON public.users USING btree (ap_id);
--
-- Name: users_email_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX users_email_index ON public.users USING btree (email);
--
-- Name: users_featured_address_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX users_featured_address_index ON public.users USING btree (featured_address);
--
-- Name: users_follower_address_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX users_follower_address_index ON public.users USING btree (follower_address);
--
-- Name: users_following_address_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX users_following_address_index ON public.users USING btree (following_address);
--
-- Name: users_fts_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX users_fts_index ON public.users USING gin (((setweight(to_tsvector('simple'::regconfig, public.regexp_replace(nickname, '\W'::public.citext, ' '::text, 'g'::text)), 'A'::"char") || setweight(to_tsvector('simple'::regconfig, regexp_replace((COALESCE(name, ''::character varying))::text, '\W'::text, ' '::text, 'g'::text)), 'B'::"char"))));
--
-- Name: users_invisible_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX users_invisible_index ON public.users USING btree (invisible);
--
-- Name: users_is_active_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX users_is_active_index ON public.users USING btree (is_active);
--
-- Name: users_is_admin_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX users_is_admin_index ON public.users USING btree (is_admin);
--
-- Name: users_is_discoverable_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX users_is_discoverable_index ON public.users USING btree (is_discoverable);
--
-- Name: users_is_moderator_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX users_is_moderator_index ON public.users USING btree (is_moderator);
--
-- Name: users_is_suggested_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX users_is_suggested_index ON public.users USING btree (is_suggested);
--
-- Name: users_last_active_at_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX users_last_active_at_index ON public.users USING btree (last_active_at);
--
-- Name: users_last_status_at_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX users_last_status_at_index ON public.users USING btree (last_status_at);
--
-- Name: users_local_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX users_local_index ON public.users USING btree (local);
--
-- Name: users_nickname_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE UNIQUE INDEX users_nickname_index ON public.users USING btree (nickname);
--
-- Name: users_tags_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX users_tags_index ON public.users USING gin (tags);
--
-- Name: users_uri_index; Type: INDEX; Schema: public; Owner: akkoma
--
CREATE INDEX users_uri_index ON public.users USING btree (uri);
--
-- Name: oban_jobs oban_notify; Type: TRIGGER; Schema: public; Owner: akkoma
--
CREATE TRIGGER oban_notify AFTER INSERT ON public.oban_jobs FOR EACH ROW EXECUTE FUNCTION public.oban_jobs_notify();
--
-- Name: activities status_visibility_counter_cache_trigger; Type: TRIGGER; Schema: public; Owner: akkoma
--
CREATE TRIGGER status_visibility_counter_cache_trigger BEFORE INSERT OR DELETE OR UPDATE OF recipients, data ON public.activities FOR EACH ROW EXECUTE FUNCTION public.update_status_visibility_counter_cache();
--
-- Name: announcement_read_relationships announcement_read_relationships_announcement_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.announcement_read_relationships
ADD CONSTRAINT announcement_read_relationships_announcement_id_fkey FOREIGN KEY (announcement_id) REFERENCES public.announcements(id) ON DELETE CASCADE;
--
-- Name: announcement_read_relationships announcement_read_relationships_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.announcement_read_relationships
ADD CONSTRAINT announcement_read_relationships_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: apps apps_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.apps
ADD CONSTRAINT apps_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: backups backups_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.backups
ADD CONSTRAINT backups_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: bookmarks bookmarks_activity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.bookmarks
ADD CONSTRAINT bookmarks_activity_id_fkey FOREIGN KEY (activity_id) REFERENCES public.activities(id) ON DELETE CASCADE;
--
-- Name: bookmarks bookmarks_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.bookmarks
ADD CONSTRAINT bookmarks_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: chat_message_references chat_message_references_chat_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.chat_message_references
ADD CONSTRAINT chat_message_references_chat_id_fkey FOREIGN KEY (chat_id) REFERENCES public.chats(id) ON DELETE CASCADE;
--
-- Name: chat_message_references chat_message_references_object_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.chat_message_references
ADD CONSTRAINT chat_message_references_object_id_fkey FOREIGN KEY (object_id) REFERENCES public.objects(id) ON DELETE CASCADE;
--
-- Name: chats chats_recipient_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.chats
ADD CONSTRAINT chats_recipient_fkey FOREIGN KEY (recipient) REFERENCES public.users(ap_id) ON DELETE CASCADE;
--
-- Name: chats chats_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.chats
ADD CONSTRAINT chats_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: conversation_participation_recipient_ships conversation_participation_recipient_ships_participation_id_fke; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.conversation_participation_recipient_ships
ADD CONSTRAINT conversation_participation_recipient_ships_participation_id_fke FOREIGN KEY (participation_id) REFERENCES public.conversation_participations(id) ON DELETE CASCADE;
--
-- Name: conversation_participation_recipient_ships conversation_participation_recipient_ships_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.conversation_participation_recipient_ships
ADD CONSTRAINT conversation_participation_recipient_ships_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: conversation_participations conversation_participations_conversation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.conversation_participations
ADD CONSTRAINT conversation_participations_conversation_id_fkey FOREIGN KEY (conversation_id) REFERENCES public.conversations(id) ON DELETE CASCADE;
--
-- Name: conversation_participations conversation_participations_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.conversation_participations
ADD CONSTRAINT conversation_participations_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: data_migration_failed_ids data_migration_failed_ids_data_migration_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.data_migration_failed_ids
ADD CONSTRAINT data_migration_failed_ids_data_migration_id_fkey FOREIGN KEY (data_migration_id) REFERENCES public.data_migrations(id);
--
-- Name: deliveries deliveries_object_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.deliveries
ADD CONSTRAINT deliveries_object_id_fkey FOREIGN KEY (object_id) REFERENCES public.objects(id);
--
-- Name: deliveries deliveries_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.deliveries
ADD CONSTRAINT deliveries_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: filters filters_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.filters
ADD CONSTRAINT filters_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: following_relationships following_relationships_follower_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.following_relationships
ADD CONSTRAINT following_relationships_follower_id_fkey FOREIGN KEY (follower_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: following_relationships following_relationships_following_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.following_relationships
ADD CONSTRAINT following_relationships_following_id_fkey FOREIGN KEY (following_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: hashtags_objects hashtags_objects_hashtag_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.hashtags_objects
ADD CONSTRAINT hashtags_objects_hashtag_id_fkey FOREIGN KEY (hashtag_id) REFERENCES public.hashtags(id);
--
-- Name: hashtags_objects hashtags_objects_object_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.hashtags_objects
ADD CONSTRAINT hashtags_objects_object_id_fkey FOREIGN KEY (object_id) REFERENCES public.objects(id) ON DELETE CASCADE;
--
-- Name: lists lists_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.lists
ADD CONSTRAINT lists_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: markers markers_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.markers
ADD CONSTRAINT markers_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: mfa_tokens mfa_tokens_authorization_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.mfa_tokens
ADD CONSTRAINT mfa_tokens_authorization_id_fkey FOREIGN KEY (authorization_id) REFERENCES public.oauth_authorizations(id) ON DELETE CASCADE;
--
-- Name: mfa_tokens mfa_tokens_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.mfa_tokens
ADD CONSTRAINT mfa_tokens_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: notifications notifications_activity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.notifications
ADD CONSTRAINT notifications_activity_id_fkey FOREIGN KEY (activity_id) REFERENCES public.activities(id) ON DELETE CASCADE;
--
-- Name: notifications notifications_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.notifications
ADD CONSTRAINT notifications_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: oauth_authorizations oauth_authorizations_app_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.oauth_authorizations
ADD CONSTRAINT oauth_authorizations_app_id_fkey FOREIGN KEY (app_id) REFERENCES public.apps(id);
--
-- Name: oauth_authorizations oauth_authorizations_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.oauth_authorizations
ADD CONSTRAINT oauth_authorizations_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: oauth_tokens oauth_tokens_app_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.oauth_tokens
ADD CONSTRAINT oauth_tokens_app_id_fkey FOREIGN KEY (app_id) REFERENCES public.apps(id);
--
-- Name: oauth_tokens oauth_tokens_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.oauth_tokens
ADD CONSTRAINT oauth_tokens_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: password_reset_tokens password_reset_tokens_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.password_reset_tokens
ADD CONSTRAINT password_reset_tokens_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: push_subscriptions push_subscriptions_token_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.push_subscriptions
ADD CONSTRAINT push_subscriptions_token_id_fkey FOREIGN KEY (token_id) REFERENCES public.oauth_tokens(id) ON DELETE CASCADE;
--
-- Name: push_subscriptions push_subscriptions_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.push_subscriptions
ADD CONSTRAINT push_subscriptions_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: registrations registrations_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.registrations
ADD CONSTRAINT registrations_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: report_notes report_notes_activity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.report_notes
ADD CONSTRAINT report_notes_activity_id_fkey FOREIGN KEY (activity_id) REFERENCES public.activities(id) ON DELETE CASCADE;
--
-- Name: report_notes report_notes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.report_notes
ADD CONSTRAINT report_notes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);
--
-- Name: scheduled_activities scheduled_activities_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.scheduled_activities
ADD CONSTRAINT scheduled_activities_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: thread_mutes thread_mutes_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.thread_mutes
ADD CONSTRAINT thread_mutes_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: user_follows_hashtag user_follows_hashtag_hashtag_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.user_follows_hashtag
ADD CONSTRAINT user_follows_hashtag_hashtag_id_fkey FOREIGN KEY (hashtag_id) REFERENCES public.hashtags(id);
--
-- Name: user_follows_hashtag user_follows_hashtag_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.user_follows_hashtag
ADD CONSTRAINT user_follows_hashtag_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: user_frontend_setting_profiles user_frontend_setting_profiles_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.user_frontend_setting_profiles
ADD CONSTRAINT user_frontend_setting_profiles_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: user_notes user_notes_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.user_notes
ADD CONSTRAINT user_notes_source_id_fkey FOREIGN KEY (source_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: user_notes user_notes_target_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.user_notes
ADD CONSTRAINT user_notes_target_id_fkey FOREIGN KEY (target_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: user_relationships user_relationships_source_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.user_relationships
ADD CONSTRAINT user_relationships_source_id_fkey FOREIGN KEY (source_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- Name: user_relationships user_relationships_target_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: akkoma
--
ALTER TABLE ONLY public.user_relationships
ADD CONSTRAINT user_relationships_target_id_fkey FOREIGN KEY (target_id) REFERENCES public.users(id) ON DELETE CASCADE;
--
-- PostgreSQL database dump complete
--
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment