5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 18:16:22 +00:00
panel/db/structure.sql

2725 lines
69 KiB
MySQL
Raw Permalink Normal View History

2023-05-16 16:38:49 +00:00
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: 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: pgcrypto; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA public;
--
-- Name: EXTENSION pgcrypto; Type: COMMENT; Schema: -; Owner: -
--
COMMENT ON EXTENSION pgcrypto IS 'cryptographic functions';
2024-01-08 19:28:31 +00:00
--
-- Name: access_logs_before_insert_row_tr(); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION public.access_logs_before_insert_row_tr() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
new.created_at := to_timestamp(new.msec);
RETURN NEW;
END;
$$;
--
-- Name: indexed_posts_before_insert_update_row_tr(); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION public.indexed_posts_before_insert_update_row_tr() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
new.indexed_content := to_tsvector(('pg_catalog.' || new.dictionary)::regconfig, coalesce(new.title, '') || '
' || coalesce(new.content,''));
RETURN NEW;
END;
$$;
2023-05-16 16:38:49 +00:00
--
-- Name: que_validate_tags(jsonb); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION public.que_validate_tags(tags_array jsonb) RETURNS boolean
LANGUAGE sql
AS $$
SELECT bool_and(
jsonb_typeof(value) = 'string'
AND
char_length(value::text) <= 100
)
FROM jsonb_array_elements(tags_array)
$$;
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- Name: que_jobs; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.que_jobs (
priority smallint DEFAULT 100 NOT NULL,
run_at timestamp with time zone DEFAULT now() NOT NULL,
id bigint NOT NULL,
job_class text NOT NULL,
error_count integer DEFAULT 0 NOT NULL,
last_error_message text,
queue text DEFAULT 'default'::text NOT NULL,
last_error_backtrace text,
finished_at timestamp with time zone,
expired_at timestamp with time zone,
args jsonb DEFAULT '[]'::jsonb NOT NULL,
data jsonb DEFAULT '{}'::jsonb NOT NULL,
job_schema_version integer NOT NULL,
kwargs jsonb DEFAULT '{}'::jsonb NOT NULL,
CONSTRAINT error_length CHECK (((char_length(last_error_message) <= 500) AND (char_length(last_error_backtrace) <= 10000))),
CONSTRAINT job_class_length CHECK ((char_length(
CASE job_class
WHEN 'ActiveJob::QueueAdapters::QueAdapter::JobWrapper'::text THEN ((args -> 0) ->> 'job_class'::text)
ELSE job_class
END) <= 200)),
CONSTRAINT queue_length CHECK ((char_length(queue) <= 100)),
CONSTRAINT valid_args CHECK ((jsonb_typeof(args) = 'array'::text)),
CONSTRAINT valid_data CHECK (((jsonb_typeof(data) = 'object'::text) AND ((NOT (data ? 'tags'::text)) OR ((jsonb_typeof((data -> 'tags'::text)) = 'array'::text) AND (jsonb_array_length((data -> 'tags'::text)) <= 5) AND public.que_validate_tags((data -> 'tags'::text))))))
)
WITH (fillfactor='90');
--
-- Name: TABLE que_jobs; Type: COMMENT; Schema: public; Owner: -
--
COMMENT ON TABLE public.que_jobs IS '7';
--
-- Name: que_determine_job_state(public.que_jobs); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION public.que_determine_job_state(job public.que_jobs) RETURNS text
LANGUAGE sql
AS $$
SELECT
CASE
WHEN job.expired_at IS NOT NULL THEN 'expired'
WHEN job.finished_at IS NOT NULL THEN 'finished'
WHEN job.error_count > 0 THEN 'errored'
WHEN job.run_at > CURRENT_TIMESTAMP THEN 'scheduled'
ELSE 'ready'
END
$$;
--
-- Name: que_job_notify(); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION public.que_job_notify() RETURNS trigger
LANGUAGE plpgsql
AS $$
DECLARE
locker_pid integer;
sort_key json;
BEGIN
-- Don't do anything if the job is scheduled for a future time.
IF NEW.run_at IS NOT NULL AND NEW.run_at > now() THEN
RETURN null;
END IF;
-- Pick a locker to notify of the job's insertion, weighted by their number
-- of workers. Should bounce pseudorandomly between lockers on each
-- invocation, hence the md5-ordering, but still touch each one equally,
-- hence the modulo using the job_id.
SELECT pid
INTO locker_pid
FROM (
SELECT *, last_value(row_number) OVER () + 1 AS count
FROM (
SELECT *, row_number() OVER () - 1 AS row_number
FROM (
SELECT *
FROM public.que_lockers ql, generate_series(1, ql.worker_count) AS id
WHERE
listening AND
queues @> ARRAY[NEW.queue] AND
ql.job_schema_version = NEW.job_schema_version
ORDER BY md5(pid::text || id::text)
) t1
) t2
) t3
WHERE NEW.id % count = row_number;
IF locker_pid IS NOT NULL THEN
-- There's a size limit to what can be broadcast via LISTEN/NOTIFY, so
-- rather than throw errors when someone enqueues a big job, just
-- broadcast the most pertinent information, and let the locker query for
-- the record after it's taken the lock. The worker will have to hit the
-- DB in order to make sure the job is still visible anyway.
SELECT row_to_json(t)
INTO sort_key
FROM (
SELECT
'job_available' AS message_type,
NEW.queue AS queue,
NEW.priority AS priority,
NEW.id AS id,
-- Make sure we output timestamps as UTC ISO 8601
to_char(NEW.run_at AT TIME ZONE 'UTC', 'YYYY-MM-DD"T"HH24:MI:SS.US"Z"') AS run_at
) t;
PERFORM pg_notify('que_listener_' || locker_pid::text, sort_key::text);
END IF;
RETURN null;
END
$$;
--
-- Name: que_state_notify(); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION public.que_state_notify() RETURNS trigger
LANGUAGE plpgsql
AS $$
DECLARE
row record;
message json;
previous_state text;
current_state text;
BEGIN
IF TG_OP = 'INSERT' THEN
previous_state := 'nonexistent';
current_state := public.que_determine_job_state(NEW);
row := NEW;
ELSIF TG_OP = 'DELETE' THEN
previous_state := public.que_determine_job_state(OLD);
current_state := 'nonexistent';
row := OLD;
ELSIF TG_OP = 'UPDATE' THEN
previous_state := public.que_determine_job_state(OLD);
current_state := public.que_determine_job_state(NEW);
-- If the state didn't change, short-circuit.
IF previous_state = current_state THEN
RETURN null;
END IF;
row := NEW;
ELSE
RAISE EXCEPTION 'Unrecognized TG_OP: %', TG_OP;
END IF;
SELECT row_to_json(t)
INTO message
FROM (
SELECT
'job_change' AS message_type,
row.id AS id,
row.queue AS queue,
coalesce(row.data->'tags', '[]'::jsonb) AS tags,
to_char(row.run_at AT TIME ZONE 'UTC', 'YYYY-MM-DD"T"HH24:MI:SS.US"Z"') AS run_at,
to_char(now() AT TIME ZONE 'UTC', 'YYYY-MM-DD"T"HH24:MI:SS.US"Z"') AS time,
CASE row.job_class
WHEN 'ActiveJob::QueueAdapters::QueAdapter::JobWrapper' THEN
coalesce(
row.args->0->>'job_class',
'ActiveJob::QueueAdapters::QueAdapter::JobWrapper'
)
ELSE
row.job_class
END AS job_class,
previous_state AS previous_state,
current_state AS current_state
) t;
PERFORM pg_notify('que_state', message::text);
RETURN null;
END
$$;
--
-- Name: access_logs; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.access_logs (
id uuid DEFAULT public.gen_random_uuid() NOT NULL,
host character varying,
msec double precision,
server_protocol character varying,
request_method character varying,
request_completion character varying,
uri character varying,
query_string character varying,
status integer,
sent_http_content_type character varying,
sent_http_content_encoding character varying,
sent_http_etag character varying,
sent_http_last_modified character varying,
http_accept character varying,
http_accept_encoding character varying,
http_accept_language character varying,
http_pragma character varying,
http_cache_control character varying,
http_if_none_match character varying,
http_dnt character varying,
http_user_agent character varying,
http_origin character varying,
request_time double precision,
bytes_sent integer,
body_bytes_sent integer,
request_length integer,
http_connection character varying,
pipe character varying,
connection_requests integer,
geoip2_data_country_name character varying,
geoip2_data_city_name character varying,
ssl_server_name character varying,
ssl_protocol character varying,
ssl_early_data character varying,
ssl_session_reused character varying,
ssl_curves character varying,
ssl_ciphers character varying,
ssl_cipher character varying,
sent_http_x_xss_protection character varying,
sent_http_x_frame_options character varying,
sent_http_x_content_type_options character varying,
sent_http_strict_transport_security character varying,
nginx_version character varying,
pid integer,
remote_user character varying,
crawler boolean DEFAULT false,
http_referer character varying,
created_at timestamp(6) without time zone,
request_uri character varying DEFAULT ''::character varying,
datacenter_co2 numeric,
network_co2 numeric,
consumer_device_co2 numeric,
production_co2 numeric,
total_co2 numeric,
node character varying
);
--
-- Name: action_text_rich_texts; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.action_text_rich_texts (
id bigint NOT NULL,
name character varying NOT NULL,
body text,
record_type character varying NOT NULL,
record_id integer NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
--
-- Name: action_text_rich_texts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.action_text_rich_texts_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: action_text_rich_texts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.action_text_rich_texts_id_seq OWNED BY public.action_text_rich_texts.id;
--
-- Name: active_storage_attachments; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.active_storage_attachments (
id bigint NOT NULL,
name character varying NOT NULL,
record_type character varying NOT NULL,
record_id integer NOT NULL,
blob_id integer NOT NULL,
created_at timestamp without time zone NOT NULL
);
--
-- Name: active_storage_attachments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.active_storage_attachments_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: active_storage_attachments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.active_storage_attachments_id_seq OWNED BY public.active_storage_attachments.id;
--
-- Name: active_storage_blobs; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.active_storage_blobs (
id bigint NOT NULL,
key character varying NOT NULL,
filename character varying NOT NULL,
content_type character varying,
metadata text,
byte_size bigint NOT NULL,
checksum character varying NOT NULL,
created_at timestamp without time zone NOT NULL,
service_name character varying NOT NULL
);
--
-- Name: active_storage_blobs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.active_storage_blobs_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: active_storage_blobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.active_storage_blobs_id_seq OWNED BY public.active_storage_blobs.id;
--
-- Name: active_storage_variant_records; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.active_storage_variant_records (
id bigint NOT NULL,
blob_id bigint NOT NULL,
variation_digest character varying NOT NULL
);
--
-- Name: active_storage_variant_records_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.active_storage_variant_records_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: active_storage_variant_records_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.active_storage_variant_records_id_seq OWNED BY public.active_storage_variant_records.id;
--
-- Name: activity_pub_activities; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.activity_pub_activities (
id uuid DEFAULT gen_random_uuid() NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
activity_pub_id uuid NOT NULL,
type character varying NOT NULL,
uri character varying NOT NULL,
content jsonb DEFAULT '{}'::jsonb,
actor_id uuid
);
--
-- Name: activity_pub_actors; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.activity_pub_actors (
id uuid DEFAULT gen_random_uuid() NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
instance_id uuid NOT NULL,
uri character varying NOT NULL,
mention character varying
);
2024-02-27 15:32:09 +00:00
--
-- Name: activity_pub_fediblocks; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.activity_pub_fediblocks (
id uuid DEFAULT gen_random_uuid() NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
title character varying NOT NULL,
url character varying NOT NULL,
download_url character varying,
2024-02-27 15:32:09 +00:00
format character varying NOT NULL,
hostnames jsonb DEFAULT '[]'::jsonb
2024-02-27 15:32:09 +00:00
);
--
-- Name: activity_pub_instances; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.activity_pub_instances (
id uuid DEFAULT gen_random_uuid() NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
hostname character varying NOT NULL,
aasm_state character varying NOT NULL,
content jsonb DEFAULT '{}'::jsonb
);
--
-- Name: activity_pub_objects; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.activity_pub_objects (
id uuid DEFAULT gen_random_uuid() NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
type character varying NOT NULL,
uri character varying NOT NULL,
content jsonb DEFAULT '{}'::jsonb
);
2024-03-01 18:04:07 +00:00
--
-- Name: activity_pub_remote_flags; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.activity_pub_remote_flags (
id uuid DEFAULT gen_random_uuid() NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
site_id bigint,
actor_id uuid,
message text,
content jsonb,
aasm_state character varying DEFAULT 'waiting'::character varying NOT NULL
2024-03-01 18:04:07 +00:00
);
--
-- Name: activity_pubs; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.activity_pubs (
id uuid DEFAULT gen_random_uuid() NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
site_id bigint NOT NULL,
object_id uuid NOT NULL,
object_type character varying NOT NULL,
aasm_state character varying NOT NULL,
2024-03-04 14:59:29 +00:00
instance_id uuid,
2024-03-05 17:18:06 +00:00
actor_id uuid,
remote_flag_id uuid
);
2024-02-28 20:34:34 +00:00
--
-- Name: actor_moderations; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.actor_moderations (
id uuid DEFAULT gen_random_uuid() NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
site_id bigint,
actor_id uuid,
2024-03-01 18:51:54 +00:00
aasm_state character varying NOT NULL,
remote_flag_id uuid
2024-02-28 20:34:34 +00:00
);
2023-05-16 16:38:49 +00:00
--
-- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.ar_internal_metadata (
key character varying NOT NULL,
value character varying,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
--
-- Name: blazer_audits; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.blazer_audits (
id bigint NOT NULL,
user_id bigint,
query_id bigint,
statement text,
data_source character varying,
created_at timestamp without time zone
);
--
-- Name: blazer_audits_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.blazer_audits_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: blazer_audits_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.blazer_audits_id_seq OWNED BY public.blazer_audits.id;
--
-- Name: blazer_checks; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.blazer_checks (
id bigint NOT NULL,
creator_id bigint,
query_id bigint,
state character varying,
schedule character varying,
emails text,
slack_channels text,
check_type character varying,
message text,
last_run_at timestamp without time zone,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
--
-- Name: blazer_checks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.blazer_checks_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: blazer_checks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.blazer_checks_id_seq OWNED BY public.blazer_checks.id;
--
-- Name: blazer_dashboard_queries; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.blazer_dashboard_queries (
id bigint NOT NULL,
dashboard_id bigint,
query_id bigint,
"position" integer,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
--
-- Name: blazer_dashboard_queries_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.blazer_dashboard_queries_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: blazer_dashboard_queries_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.blazer_dashboard_queries_id_seq OWNED BY public.blazer_dashboard_queries.id;
--
-- Name: blazer_dashboards; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.blazer_dashboards (
id bigint NOT NULL,
creator_id bigint,
name text,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
--
-- Name: blazer_dashboards_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.blazer_dashboards_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: blazer_dashboards_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.blazer_dashboards_id_seq OWNED BY public.blazer_dashboards.id;
--
-- Name: blazer_queries; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.blazer_queries (
id bigint NOT NULL,
creator_id bigint,
name character varying,
description text,
statement text,
data_source character varying,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
--
-- Name: blazer_queries_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.blazer_queries_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: blazer_queries_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.blazer_queries_id_seq OWNED BY public.blazer_queries.id;
--
-- Name: build_stats; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.build_stats (
id bigint NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
deploy_id integer,
bytes bigint,
seconds double precision,
action character varying NOT NULL,
log text,
status boolean DEFAULT false
);
--
-- Name: build_stats_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.build_stats_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: build_stats_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.build_stats_id_seq OWNED BY public.build_stats.id;
--
-- Name: codes_of_conduct; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.codes_of_conduct (
id bigint NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
title character varying,
description text,
content text
);
--
-- Name: codes_of_conduct_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.codes_of_conduct_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: codes_of_conduct_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.codes_of_conduct_id_seq OWNED BY public.codes_of_conduct.id;
--
-- Name: csp_reports; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.csp_reports (
id uuid DEFAULT public.gen_random_uuid() NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
disposition character varying,
referrer character varying,
blocked_uri character varying,
document_uri character varying,
effective_directive character varying,
original_policy character varying,
script_sample character varying,
status_code character varying,
violated_directive character varying,
column_number integer,
line_number integer,
source_file character varying
);
--
-- Name: deploys; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.deploys (
id bigint NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
site_id integer,
type character varying,
"values" text,
rol_id integer
2023-05-16 16:38:49 +00:00
);
--
-- Name: deploys_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.deploys_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: deploys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.deploys_id_seq OWNED BY public.deploys.id;
--
-- Name: designs; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.designs (
id bigint NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
name character varying,
description text,
gem character varying,
url character varying,
license character varying,
disabled boolean DEFAULT false,
credits text,
designer_url character varying,
priority integer
);
--
-- Name: designs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.designs_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: designs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.designs_id_seq OWNED BY public.designs.id;
--
-- Name: distributed_press_publishers; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.distributed_press_publishers (
id bigint NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
instance character varying,
token_ciphertext text NOT NULL,
expires_at timestamp without time zone
);
--
-- Name: distributed_press_publishers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.distributed_press_publishers_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: distributed_press_publishers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.distributed_press_publishers_id_seq OWNED BY public.distributed_press_publishers.id;
2024-02-27 16:43:46 +00:00
--
-- Name: fediblock_states; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.fediblock_states (
id uuid DEFAULT gen_random_uuid() NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
site_id bigint,
fediblock_id uuid,
aasm_state character varying
);
2023-05-16 16:38:49 +00:00
--
-- Name: indexed_posts; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.indexed_posts (
id uuid DEFAULT public.gen_random_uuid() NOT NULL,
site_id bigint,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
locale character varying DEFAULT 'simple'::character varying,
layout character varying NOT NULL,
path character varying NOT NULL,
title character varying DEFAULT ''::character varying,
front_matter jsonb DEFAULT '"{}"'::jsonb,
content character varying DEFAULT ''::character varying,
indexed_content tsvector,
"order" integer DEFAULT 0,
dictionary character varying,
post_id uuid
);
--
-- Name: instance_moderations; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.instance_moderations (
id bigint NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
site_id bigint,
instance_id uuid,
aasm_state character varying DEFAULT 'paused'::character varying NOT NULL
);
--
-- Name: instance_moderations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.instance_moderations_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: instance_moderations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.instance_moderations_id_seq OWNED BY public.instance_moderations.id;
2023-05-16 16:38:49 +00:00
--
-- Name: licencias; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.licencias (
id bigint NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
name character varying,
description text,
deed text,
url character varying,
icons character varying,
short_description character varying
);
--
-- Name: licencias_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.licencias_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: licencias_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.licencias_id_seq OWNED BY public.licencias.id;
--
-- Name: log_entries; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.log_entries (
id bigint NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
site_id bigint,
text text,
sent boolean DEFAULT false
);
--
-- Name: log_entries_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.log_entries_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: log_entries_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.log_entries_id_seq OWNED BY public.log_entries.id;
--
-- Name: maintenances; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.maintenances (
id bigint NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
message text,
estimated_from timestamp without time zone,
estimated_to timestamp without time zone,
are_we_back boolean DEFAULT false
);
--
-- Name: maintenances_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.maintenances_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: maintenances_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.maintenances_id_seq OWNED BY public.maintenances.id;
--
-- Name: mobility_string_translations; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.mobility_string_translations (
id bigint NOT NULL,
locale character varying NOT NULL,
key character varying NOT NULL,
value character varying,
translatable_type character varying,
translatable_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
--
-- Name: mobility_string_translations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.mobility_string_translations_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: mobility_string_translations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.mobility_string_translations_id_seq OWNED BY public.mobility_string_translations.id;
--
-- Name: mobility_text_translations; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.mobility_text_translations (
id bigint NOT NULL,
locale character varying NOT NULL,
key character varying NOT NULL,
value text,
translatable_type character varying,
translatable_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
--
-- Name: mobility_text_translations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.mobility_text_translations_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: mobility_text_translations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.mobility_text_translations_id_seq OWNED BY public.mobility_text_translations.id;
--
-- Name: privacy_policies; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.privacy_policies (
id bigint NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
title character varying,
description text,
content text
);
--
-- Name: privacy_policies_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.privacy_policies_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: privacy_policies_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.privacy_policies_id_seq OWNED BY public.privacy_policies.id;
--
-- Name: que_jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.que_jobs_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: que_jobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.que_jobs_id_seq OWNED BY public.que_jobs.id;
--
-- Name: que_lockers; Type: TABLE; Schema: public; Owner: -
--
CREATE UNLOGGED TABLE public.que_lockers (
pid integer NOT NULL,
worker_count integer NOT NULL,
worker_priorities integer[] NOT NULL,
ruby_pid integer NOT NULL,
ruby_hostname text NOT NULL,
queues text[] NOT NULL,
listening boolean NOT NULL,
job_schema_version integer DEFAULT 1,
CONSTRAINT valid_queues CHECK (((array_ndims(queues) = 1) AND (array_length(queues, 1) IS NOT NULL))),
CONSTRAINT valid_worker_priorities CHECK (((array_ndims(worker_priorities) = 1) AND (array_length(worker_priorities, 1) IS NOT NULL)))
);
--
-- Name: que_values; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.que_values (
key text NOT NULL,
value jsonb DEFAULT '{}'::jsonb NOT NULL,
CONSTRAINT valid_value CHECK ((jsonb_typeof(value) = 'object'::text))
)
WITH (fillfactor='90');
--
-- Name: roles; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.roles (
id bigint NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
site_id integer,
usuarie_id integer,
rol character varying,
2024-01-08 19:28:31 +00:00
temporal boolean,
token character varying
2023-05-16 16:38:49 +00:00
);
--
-- Name: roles_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.roles_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: roles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.roles_id_seq OWNED BY public.roles.id;
--
-- Name: rollups; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.rollups (
id bigint NOT NULL,
name character varying NOT NULL,
"interval" character varying NOT NULL,
"time" timestamp without time zone NOT NULL,
dimensions jsonb DEFAULT '{}'::jsonb NOT NULL,
value double precision
);
--
-- Name: rollups_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.rollups_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: rollups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.rollups_id_seq OWNED BY public.rollups.id;
--
-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.schema_migrations (
version character varying NOT NULL
);
--
-- Name: sites; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.sites (
id bigint NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
name character varying,
design_id integer,
licencia_id integer,
status character varying DEFAULT 'waiting'::character varying,
description text,
title character varying,
colaboracion_anonima boolean DEFAULT false,
contact boolean DEFAULT false,
private_key_ciphertext character varying,
acepta_invitades boolean DEFAULT false,
tienda_api_key_ciphertext character varying DEFAULT ''::character varying,
tienda_url character varying DEFAULT ''::character varying,
api_key_ciphertext character varying,
2023-05-24 19:52:29 +00:00
slugify_mode character varying DEFAULT 'default'::character varying,
2024-01-08 19:28:31 +00:00
pagination boolean DEFAULT false,
private_key_pem_ciphertext text,
last_indexed_commit character varying
2023-05-16 16:38:49 +00:00
);
--
-- Name: sites_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.sites_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: sites_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.sites_id_seq OWNED BY public.sites.id;
--
-- Name: stats; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.stats (
id bigint NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
site_id bigint,
name character varying NOT NULL
);
--
-- Name: stats_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.stats_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: stats_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.stats_id_seq OWNED BY public.stats.id;
--
-- Name: usuaries; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.usuaries (
id bigint NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
email character varying DEFAULT ''::character varying NOT NULL,
encrypted_password character varying DEFAULT ''::character varying NOT NULL,
reset_password_token character varying,
reset_password_sent_at timestamp without time zone,
remember_created_at timestamp without time zone,
confirmation_token character varying,
confirmed_at timestamp without time zone,
confirmation_sent_at timestamp without time zone,
unconfirmed_email character varying,
failed_attempts integer DEFAULT 0 NOT NULL,
unlock_token character varying,
locked_at timestamp without time zone,
invitation_token character varying,
invitation_created_at timestamp without time zone,
invitation_sent_at timestamp without time zone,
invitation_accepted_at timestamp without time zone,
invitation_limit integer,
invited_by_type character varying,
invited_by_id integer,
invitations_count integer DEFAULT 0,
lang character varying DEFAULT 'es'::character varying,
privacy_policy_accepted_at timestamp without time zone,
terms_of_service_accepted_at timestamp without time zone,
code_of_conduct_accepted_at timestamp without time zone,
available_for_feedback_accepted_at timestamp without time zone
);
--
-- Name: usuaries_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.usuaries_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: usuaries_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.usuaries_id_seq OWNED BY public.usuaries.id;
--
-- Name: action_text_rich_texts id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.action_text_rich_texts ALTER COLUMN id SET DEFAULT nextval('public.action_text_rich_texts_id_seq'::regclass);
--
-- Name: active_storage_attachments id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.active_storage_attachments ALTER COLUMN id SET DEFAULT nextval('public.active_storage_attachments_id_seq'::regclass);
--
-- Name: active_storage_blobs id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.active_storage_blobs ALTER COLUMN id SET DEFAULT nextval('public.active_storage_blobs_id_seq'::regclass);
--
-- Name: active_storage_variant_records id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.active_storage_variant_records ALTER COLUMN id SET DEFAULT nextval('public.active_storage_variant_records_id_seq'::regclass);
--
-- Name: blazer_audits id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.blazer_audits ALTER COLUMN id SET DEFAULT nextval('public.blazer_audits_id_seq'::regclass);
--
-- Name: blazer_checks id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.blazer_checks ALTER COLUMN id SET DEFAULT nextval('public.blazer_checks_id_seq'::regclass);
--
-- Name: blazer_dashboard_queries id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.blazer_dashboard_queries ALTER COLUMN id SET DEFAULT nextval('public.blazer_dashboard_queries_id_seq'::regclass);
--
-- Name: blazer_dashboards id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.blazer_dashboards ALTER COLUMN id SET DEFAULT nextval('public.blazer_dashboards_id_seq'::regclass);
--
-- Name: blazer_queries id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.blazer_queries ALTER COLUMN id SET DEFAULT nextval('public.blazer_queries_id_seq'::regclass);
--
-- Name: build_stats id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.build_stats ALTER COLUMN id SET DEFAULT nextval('public.build_stats_id_seq'::regclass);
--
-- Name: codes_of_conduct id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.codes_of_conduct ALTER COLUMN id SET DEFAULT nextval('public.codes_of_conduct_id_seq'::regclass);
--
-- Name: deploys id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.deploys ALTER COLUMN id SET DEFAULT nextval('public.deploys_id_seq'::regclass);
--
-- Name: designs id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.designs ALTER COLUMN id SET DEFAULT nextval('public.designs_id_seq'::regclass);
--
-- Name: distributed_press_publishers id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.distributed_press_publishers ALTER COLUMN id SET DEFAULT nextval('public.distributed_press_publishers_id_seq'::regclass);
--
-- Name: instance_moderations id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.instance_moderations ALTER COLUMN id SET DEFAULT nextval('public.instance_moderations_id_seq'::regclass);
2023-05-16 16:38:49 +00:00
--
-- Name: licencias id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.licencias ALTER COLUMN id SET DEFAULT nextval('public.licencias_id_seq'::regclass);
--
-- Name: log_entries id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.log_entries ALTER COLUMN id SET DEFAULT nextval('public.log_entries_id_seq'::regclass);
--
-- Name: maintenances id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.maintenances ALTER COLUMN id SET DEFAULT nextval('public.maintenances_id_seq'::regclass);
--
-- Name: mobility_string_translations id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.mobility_string_translations ALTER COLUMN id SET DEFAULT nextval('public.mobility_string_translations_id_seq'::regclass);
--
-- Name: mobility_text_translations id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.mobility_text_translations ALTER COLUMN id SET DEFAULT nextval('public.mobility_text_translations_id_seq'::regclass);
--
-- Name: privacy_policies id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.privacy_policies ALTER COLUMN id SET DEFAULT nextval('public.privacy_policies_id_seq'::regclass);
--
-- Name: que_jobs id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.que_jobs ALTER COLUMN id SET DEFAULT nextval('public.que_jobs_id_seq'::regclass);
--
-- Name: roles id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.roles ALTER COLUMN id SET DEFAULT nextval('public.roles_id_seq'::regclass);
--
-- Name: rollups id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.rollups ALTER COLUMN id SET DEFAULT nextval('public.rollups_id_seq'::regclass);
--
-- Name: sites id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.sites ALTER COLUMN id SET DEFAULT nextval('public.sites_id_seq'::regclass);
--
-- Name: stats id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.stats ALTER COLUMN id SET DEFAULT nextval('public.stats_id_seq'::regclass);
--
-- Name: usuaries id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.usuaries ALTER COLUMN id SET DEFAULT nextval('public.usuaries_id_seq'::regclass);
--
-- Name: access_logs access_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.access_logs
ADD CONSTRAINT access_logs_pkey PRIMARY KEY (id);
--
-- Name: action_text_rich_texts action_text_rich_texts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.action_text_rich_texts
ADD CONSTRAINT action_text_rich_texts_pkey PRIMARY KEY (id);
--
-- Name: active_storage_attachments active_storage_attachments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.active_storage_attachments
ADD CONSTRAINT active_storage_attachments_pkey PRIMARY KEY (id);
--
-- Name: active_storage_blobs active_storage_blobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.active_storage_blobs
ADD CONSTRAINT active_storage_blobs_pkey PRIMARY KEY (id);
--
-- Name: active_storage_variant_records active_storage_variant_records_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.active_storage_variant_records
ADD CONSTRAINT active_storage_variant_records_pkey PRIMARY KEY (id);
--
-- Name: activity_pub_activities activity_pub_activities_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.activity_pub_activities
ADD CONSTRAINT activity_pub_activities_pkey PRIMARY KEY (id);
--
-- Name: activity_pub_actors activity_pub_actors_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.activity_pub_actors
ADD CONSTRAINT activity_pub_actors_pkey PRIMARY KEY (id);
2024-02-27 15:32:09 +00:00
--
-- Name: activity_pub_fediblocks activity_pub_fediblocks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.activity_pub_fediblocks
ADD CONSTRAINT activity_pub_fediblocks_pkey PRIMARY KEY (id);
--
-- Name: activity_pub_instances activity_pub_instances_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.activity_pub_instances
ADD CONSTRAINT activity_pub_instances_pkey PRIMARY KEY (id);
--
-- Name: activity_pub_objects activity_pub_objects_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.activity_pub_objects
ADD CONSTRAINT activity_pub_objects_pkey PRIMARY KEY (id);
2024-03-01 18:04:07 +00:00
--
-- Name: activity_pub_remote_flags activity_pub_remote_flags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.activity_pub_remote_flags
ADD CONSTRAINT activity_pub_remote_flags_pkey PRIMARY KEY (id);
--
-- Name: activity_pubs activity_pubs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.activity_pubs
ADD CONSTRAINT activity_pubs_pkey PRIMARY KEY (id);
2024-02-28 20:34:34 +00:00
--
-- Name: actor_moderations actor_moderations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.actor_moderations
ADD CONSTRAINT actor_moderations_pkey PRIMARY KEY (id);
2023-05-16 16:38:49 +00:00
--
-- Name: blazer_audits blazer_audits_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.blazer_audits
ADD CONSTRAINT blazer_audits_pkey PRIMARY KEY (id);
--
-- Name: blazer_checks blazer_checks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.blazer_checks
ADD CONSTRAINT blazer_checks_pkey PRIMARY KEY (id);
--
-- Name: blazer_dashboard_queries blazer_dashboard_queries_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.blazer_dashboard_queries
ADD CONSTRAINT blazer_dashboard_queries_pkey PRIMARY KEY (id);
--
-- Name: blazer_dashboards blazer_dashboards_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.blazer_dashboards
ADD CONSTRAINT blazer_dashboards_pkey PRIMARY KEY (id);
--
-- Name: blazer_queries blazer_queries_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.blazer_queries
ADD CONSTRAINT blazer_queries_pkey PRIMARY KEY (id);
--
-- Name: build_stats build_stats_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.build_stats
ADD CONSTRAINT build_stats_pkey PRIMARY KEY (id);
--
-- Name: codes_of_conduct codes_of_conduct_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.codes_of_conduct
ADD CONSTRAINT codes_of_conduct_pkey PRIMARY KEY (id);
--
-- Name: csp_reports csp_reports_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.csp_reports
ADD CONSTRAINT csp_reports_pkey PRIMARY KEY (id);
--
-- Name: deploys deploys_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.deploys
ADD CONSTRAINT deploys_pkey PRIMARY KEY (id);
--
-- Name: designs designs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.designs
ADD CONSTRAINT designs_pkey PRIMARY KEY (id);
--
-- Name: distributed_press_publishers distributed_press_publishers_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.distributed_press_publishers
ADD CONSTRAINT distributed_press_publishers_pkey PRIMARY KEY (id);
2024-02-27 16:43:46 +00:00
--
-- Name: fediblock_states fediblock_states_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.fediblock_states
ADD CONSTRAINT fediblock_states_pkey PRIMARY KEY (id);
2023-05-16 16:38:49 +00:00
--
-- Name: indexed_posts indexed_posts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.indexed_posts
ADD CONSTRAINT indexed_posts_pkey PRIMARY KEY (id);
--
-- Name: instance_moderations instance_moderations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.instance_moderations
ADD CONSTRAINT instance_moderations_pkey PRIMARY KEY (id);
2023-05-16 16:38:49 +00:00
--
-- Name: licencias licencias_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.licencias
ADD CONSTRAINT licencias_pkey PRIMARY KEY (id);
--
-- Name: log_entries log_entries_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.log_entries
ADD CONSTRAINT log_entries_pkey PRIMARY KEY (id);
--
-- Name: maintenances maintenances_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.maintenances
ADD CONSTRAINT maintenances_pkey PRIMARY KEY (id);
--
-- Name: mobility_string_translations mobility_string_translations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.mobility_string_translations
ADD CONSTRAINT mobility_string_translations_pkey PRIMARY KEY (id);
--
-- Name: mobility_text_translations mobility_text_translations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.mobility_text_translations
ADD CONSTRAINT mobility_text_translations_pkey PRIMARY KEY (id);
--
-- Name: privacy_policies privacy_policies_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.privacy_policies
ADD CONSTRAINT privacy_policies_pkey PRIMARY KEY (id);
--
-- Name: que_jobs que_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.que_jobs
ADD CONSTRAINT que_jobs_pkey PRIMARY KEY (id);
--
-- Name: que_lockers que_lockers_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.que_lockers
ADD CONSTRAINT que_lockers_pkey PRIMARY KEY (pid);
--
-- Name: que_values que_values_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.que_values
ADD CONSTRAINT que_values_pkey PRIMARY KEY (key);
--
-- Name: roles roles_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.roles
ADD CONSTRAINT roles_pkey PRIMARY KEY (id);
--
-- Name: rollups rollups_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.rollups
ADD CONSTRAINT rollups_pkey PRIMARY KEY (id);
--
-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.schema_migrations
ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);
--
-- Name: sites sites_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.sites
ADD CONSTRAINT sites_pkey PRIMARY KEY (id);
--
-- Name: stats stats_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.stats
ADD CONSTRAINT stats_pkey PRIMARY KEY (id);
--
-- Name: usuaries usuaries_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.usuaries
ADD CONSTRAINT usuaries_pkey PRIMARY KEY (id);
--
-- Name: index_access_logs_on_geoip2_data_city_name; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_access_logs_on_geoip2_data_city_name ON public.access_logs USING btree (geoip2_data_city_name);
--
-- Name: index_access_logs_on_geoip2_data_country_name; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_access_logs_on_geoip2_data_country_name ON public.access_logs USING btree (geoip2_data_country_name);
--
-- Name: index_access_logs_on_host; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_access_logs_on_host ON public.access_logs USING btree (host);
--
-- Name: index_access_logs_on_http_origin; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_access_logs_on_http_origin ON public.access_logs USING btree (http_origin);
--
-- Name: index_access_logs_on_http_user_agent; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_access_logs_on_http_user_agent ON public.access_logs USING btree (http_user_agent);
--
-- Name: index_access_logs_on_status; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_access_logs_on_status ON public.access_logs USING btree (status);
--
-- Name: index_access_logs_on_uri; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_access_logs_on_uri ON public.access_logs USING btree (uri);
--
-- Name: index_action_text_rich_texts_uniqueness; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_action_text_rich_texts_uniqueness ON public.action_text_rich_texts USING btree (record_type, record_id, name);
--
-- Name: index_active_storage_attachments_on_blob_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_active_storage_attachments_on_blob_id ON public.active_storage_attachments USING btree (blob_id);
--
-- Name: index_active_storage_attachments_uniqueness; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_active_storage_attachments_uniqueness ON public.active_storage_attachments USING btree (record_type, record_id, name, blob_id);
--
-- Name: index_active_storage_blobs_on_key_and_service_name; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_active_storage_blobs_on_key_and_service_name ON public.active_storage_blobs USING btree (key, service_name);
--
-- Name: index_active_storage_variant_records_uniqueness; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_active_storage_variant_records_uniqueness ON public.active_storage_variant_records USING btree (blob_id, variation_digest);
--
-- Name: index_activity_pub_activities_on_activity_pub_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_activity_pub_activities_on_activity_pub_id ON public.activity_pub_activities USING btree (activity_pub_id);
--
-- Name: index_activity_pub_actors_on_instance_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_activity_pub_actors_on_instance_id ON public.activity_pub_actors USING btree (instance_id);
--
-- Name: index_activity_pub_actors_on_uri; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_activity_pub_actors_on_uri ON public.activity_pub_actors USING btree (uri);
--
-- Name: index_activity_pub_instances_on_hostname; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_activity_pub_instances_on_hostname ON public.activity_pub_instances USING btree (hostname);
--
-- Name: index_activity_pub_objects_on_uri; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_activity_pub_objects_on_uri ON public.activity_pub_objects USING btree (uri);
2024-03-01 18:04:07 +00:00
--
-- Name: index_activity_pub_remote_flags_on_actor_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_activity_pub_remote_flags_on_actor_id ON public.activity_pub_remote_flags USING btree (actor_id);
--
-- Name: index_activity_pub_remote_flags_on_site_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_activity_pub_remote_flags_on_site_id ON public.activity_pub_remote_flags USING btree (site_id);
--
-- Name: index_activity_pub_remote_flags_on_site_id_and_actor_id; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_activity_pub_remote_flags_on_site_id_and_actor_id ON public.activity_pub_remote_flags USING btree (site_id, actor_id);
2024-02-28 20:34:34 +00:00
--
-- Name: index_actor_moderations_on_actor_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_actor_moderations_on_actor_id ON public.actor_moderations USING btree (actor_id);
--
-- Name: index_actor_moderations_on_site_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_actor_moderations_on_site_id ON public.actor_moderations USING btree (site_id);
2023-05-16 16:38:49 +00:00
--
-- Name: index_blazer_audits_on_query_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_blazer_audits_on_query_id ON public.blazer_audits USING btree (query_id);
--
-- Name: index_blazer_audits_on_user_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_blazer_audits_on_user_id ON public.blazer_audits USING btree (user_id);
--
-- Name: index_blazer_checks_on_creator_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_blazer_checks_on_creator_id ON public.blazer_checks USING btree (creator_id);
--
-- Name: index_blazer_checks_on_query_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_blazer_checks_on_query_id ON public.blazer_checks USING btree (query_id);
--
-- Name: index_blazer_dashboard_queries_on_dashboard_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_blazer_dashboard_queries_on_dashboard_id ON public.blazer_dashboard_queries USING btree (dashboard_id);
--
-- Name: index_blazer_dashboard_queries_on_query_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_blazer_dashboard_queries_on_query_id ON public.blazer_dashboard_queries USING btree (query_id);
--
-- Name: index_blazer_dashboards_on_creator_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_blazer_dashboards_on_creator_id ON public.blazer_dashboards USING btree (creator_id);
--
-- Name: index_blazer_queries_on_creator_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_blazer_queries_on_creator_id ON public.blazer_queries USING btree (creator_id);
--
-- Name: index_build_stats_on_deploy_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_build_stats_on_deploy_id ON public.build_stats USING btree (deploy_id);
--
-- Name: index_deploys_on_site_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_deploys_on_site_id ON public.deploys USING btree (site_id);
--
-- Name: index_deploys_on_type; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_deploys_on_type ON public.deploys USING btree (type);
--
-- Name: index_designs_on_gem; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_designs_on_gem ON public.designs USING btree (gem);
--
-- Name: index_designs_on_name; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_designs_on_name ON public.designs USING btree (name);
2024-02-27 16:43:46 +00:00
--
-- Name: index_fediblock_states_on_fediblock_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_fediblock_states_on_fediblock_id ON public.fediblock_states USING btree (fediblock_id);
--
-- Name: index_fediblock_states_on_site_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_fediblock_states_on_site_id ON public.fediblock_states USING btree (site_id);
--
-- Name: index_fediblock_states_on_site_id_and_fediblock_id; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_fediblock_states_on_site_id_and_fediblock_id ON public.fediblock_states USING btree (site_id, fediblock_id);
2023-05-16 16:38:49 +00:00
--
-- Name: index_indexed_posts_on_front_matter; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_indexed_posts_on_front_matter ON public.indexed_posts USING gin (front_matter);
--
-- Name: index_indexed_posts_on_indexed_content; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_indexed_posts_on_indexed_content ON public.indexed_posts USING gin (indexed_content);
--
-- Name: index_indexed_posts_on_layout; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_indexed_posts_on_layout ON public.indexed_posts USING btree (layout);
--
-- Name: index_indexed_posts_on_locale; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_indexed_posts_on_locale ON public.indexed_posts USING btree (locale);
--
-- Name: index_indexed_posts_on_site_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_indexed_posts_on_site_id ON public.indexed_posts USING btree (site_id);
--
-- Name: index_instance_moderations_on_instance_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_instance_moderations_on_instance_id ON public.instance_moderations USING btree (instance_id);
--
-- Name: index_instance_moderations_on_site_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_instance_moderations_on_site_id ON public.instance_moderations USING btree (site_id);
--
-- Name: index_instance_moderations_on_site_id_and_instance_id; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_instance_moderations_on_site_id_and_instance_id ON public.instance_moderations USING btree (site_id, instance_id);
2023-05-16 16:38:49 +00:00
--
-- Name: index_licencias_on_name; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_licencias_on_name ON public.licencias USING btree (name);
--
-- Name: index_log_entries_on_site_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_log_entries_on_site_id ON public.log_entries USING btree (site_id);
--
-- Name: index_mobility_string_translations_on_keys; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_mobility_string_translations_on_keys ON public.mobility_string_translations USING btree (translatable_id, translatable_type, locale, key);
--
-- Name: index_mobility_string_translations_on_query_keys; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_mobility_string_translations_on_query_keys ON public.mobility_string_translations USING btree (translatable_type, key, value, locale);
--
-- Name: index_mobility_string_translations_on_translatable_attribute; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_mobility_string_translations_on_translatable_attribute ON public.mobility_string_translations USING btree (translatable_id, translatable_type, key);
--
-- Name: index_mobility_text_translations_on_keys; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_mobility_text_translations_on_keys ON public.mobility_text_translations USING btree (translatable_id, translatable_type, locale, key);
--
-- Name: index_mobility_text_translations_on_translatable_attribute; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_mobility_text_translations_on_translatable_attribute ON public.mobility_text_translations USING btree (translatable_id, translatable_type, key);
--
-- Name: index_roles_on_site_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_roles_on_site_id ON public.roles USING btree (site_id);
--
-- Name: index_roles_on_site_id_and_usuarie_id; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_roles_on_site_id_and_usuarie_id ON public.roles USING btree (site_id, usuarie_id);
--
-- Name: index_roles_on_usuarie_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_roles_on_usuarie_id ON public.roles USING btree (usuarie_id);
--
-- Name: index_rollups_on_name_and_interval_and_time_and_dimensions; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_rollups_on_name_and_interval_and_time_and_dimensions ON public.rollups USING btree (name, "interval", "time", dimensions);
--
-- Name: index_sites_on_design_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_sites_on_design_id ON public.sites USING btree (design_id);
--
-- Name: index_sites_on_licencia_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_sites_on_licencia_id ON public.sites USING btree (licencia_id);
--
-- Name: index_sites_on_name; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_sites_on_name ON public.sites USING btree (name);
--
-- Name: index_stats_on_name; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_stats_on_name ON public.stats USING hash (name);
--
-- Name: index_stats_on_site_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_stats_on_site_id ON public.stats USING btree (site_id);
--
-- Name: index_usuaries_on_confirmation_token; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_usuaries_on_confirmation_token ON public.usuaries USING btree (confirmation_token);
--
-- Name: index_usuaries_on_email; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_usuaries_on_email ON public.usuaries USING btree (email);
--
-- Name: index_usuaries_on_invitation_token; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_usuaries_on_invitation_token ON public.usuaries USING btree (invitation_token);
--
-- Name: index_usuaries_on_invitations_count; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_usuaries_on_invitations_count ON public.usuaries USING btree (invitations_count);
--
-- Name: index_usuaries_on_invited_by_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_usuaries_on_invited_by_id ON public.usuaries USING btree (invited_by_id);
--
-- Name: index_usuaries_on_invited_by_type_and_invited_by_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_usuaries_on_invited_by_type_and_invited_by_id ON public.usuaries USING btree (invited_by_type, invited_by_id);
--
-- Name: index_usuaries_on_reset_password_token; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_usuaries_on_reset_password_token ON public.usuaries USING btree (reset_password_token);
--
-- Name: index_usuaries_on_unlock_token; Type: INDEX; Schema: public; Owner: -
--
CREATE UNIQUE INDEX index_usuaries_on_unlock_token ON public.usuaries USING btree (unlock_token);
--
-- Name: que_jobs_args_gin_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX que_jobs_args_gin_idx ON public.que_jobs USING gin (args jsonb_path_ops);
--
-- Name: que_jobs_data_gin_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX que_jobs_data_gin_idx ON public.que_jobs USING gin (data jsonb_path_ops);
--
-- Name: que_jobs_kwargs_gin_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX que_jobs_kwargs_gin_idx ON public.que_jobs USING gin (kwargs jsonb_path_ops);
--
-- Name: que_poll_idx; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX que_poll_idx ON public.que_jobs USING btree (job_schema_version, queue, priority, run_at, id) WHERE ((finished_at IS NULL) AND (expired_at IS NULL));
--
-- Name: access_logs access_logs_before_insert_row_tr; Type: TRIGGER; Schema: public; Owner: -
--
CREATE TRIGGER access_logs_before_insert_row_tr BEFORE INSERT ON public.access_logs FOR EACH ROW EXECUTE FUNCTION public.access_logs_before_insert_row_tr();
--
-- Name: indexed_posts indexed_posts_before_insert_update_row_tr; Type: TRIGGER; Schema: public; Owner: -
--
CREATE TRIGGER indexed_posts_before_insert_update_row_tr BEFORE INSERT OR UPDATE ON public.indexed_posts FOR EACH ROW EXECUTE FUNCTION public.indexed_posts_before_insert_update_row_tr();
--
-- Name: que_jobs que_job_notify; Type: TRIGGER; Schema: public; Owner: -
--
CREATE TRIGGER que_job_notify AFTER INSERT ON public.que_jobs FOR EACH ROW WHEN ((NOT (COALESCE(current_setting('que.skip_notify'::text, true), ''::text) = 'true'::text))) EXECUTE FUNCTION public.que_job_notify();
--
-- Name: que_jobs que_state_notify; Type: TRIGGER; Schema: public; Owner: -
--
CREATE TRIGGER que_state_notify AFTER INSERT OR DELETE OR UPDATE ON public.que_jobs FOR EACH ROW WHEN ((NOT (COALESCE(current_setting('que.skip_notify'::text, true), ''::text) = 'true'::text))) EXECUTE FUNCTION public.que_state_notify();
--
-- Name: active_storage_variant_records fk_rails_993965df05; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.active_storage_variant_records
ADD CONSTRAINT fk_rails_993965df05 FOREIGN KEY (blob_id) REFERENCES public.active_storage_blobs(id);
--
-- Name: active_storage_attachments fk_rails_c3b3935057; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.active_storage_attachments
ADD CONSTRAINT fk_rails_c3b3935057 FOREIGN KEY (blob_id) REFERENCES public.active_storage_blobs(id);
--
-- PostgreSQL database dump complete
--
2023-05-24 19:52:29 +00:00
SET search_path TO "$user", public;
INSERT INTO "schema_migrations" (version) VALUES
('20180925183241'),
('20190211184815'),
('20190703190859'),
('20190703200455'),
('20190705195758'),
('20190705215536'),
('20190706000159'),
('20190706002615'),
('20190711183726'),
('20190712165059'),
('20190716195155'),
('20190716195449'),
('20190716195811'),
('20190716195812'),
('20190716202024'),
('20190717214308'),
('20190718185817'),
('20190719221653'),
('20190723220002'),
('20190725185427'),
('20190726003756'),
('20190730211624'),
('20190730211756'),
('20190820225238'),
('20190829163530'),
('20190829180743'),
('20200118155319'),
('20200126175158'),
('20200130193655'),
('20200205173039'),
('20200206151057'),
('20200206163257'),
('20200527221900'),
('20200529154040'),
('20200615171026'),
('20200616133218'),
('20200801230101'),
('20200801233025'),
('20200810230944'),
('20200811210507'),
('20200816003344'),
('20200820165316'),
('20200822204920'),
('20201111203031'),
('20201207152354'),
('20201224162153'),
('20201224162154'),
('20210414152728'),
('20210504224144'),
('20210504224343'),
('20210506212356'),
('20210507221120'),
('20210511211357'),
('20210722191718'),
('20210807003928'),
('20210807004941'),
('20210926205448'),
('20211008201239'),
('20211022224008'),
('20211022225449'),
('20220406211042'),
('20220428135113'),
('20220712135053'),
('20220802153308'),
('20230119165420'),
('20230318183722'),
('20230322214924'),
('20230322231344'),
('20230325163802'),
('20230328200129'),
('20230328213242'),
('20230328231029'),
('20230411185406'),
('20230415153231'),
('20230421182627'),
('20230424174544'),
('20230519143500'),
2024-01-08 19:28:31 +00:00
('20230524190240'),
('20230731195050'),
('20230829204127'),
('20230921155401'),
('20230927153926'),
('20240216170202'),
('20240219153919'),
('20240219175839'),
('20240219204011'),
('20240219204224'),
('20240220161414'),
('20240221184007'),
('20240223170317'),
('20240226133022'),
2024-02-27 15:32:09 +00:00
('20240226134335'),
2024-02-27 16:43:46 +00:00
('20240227134845'),
('20240227142019'),
2024-02-28 20:34:34 +00:00
('20240228171335'),
2024-03-01 18:04:07 +00:00
('20240228202830'),
2024-03-01 18:51:54 +00:00
('20240229201155'),
2024-03-04 14:59:29 +00:00
('20240301181224'),
('20240301194154'),
2024-03-05 17:18:06 +00:00
('20240301202955'),
('20240305164653'),
2024-03-08 14:24:57 +00:00
('20240305184854'),
('20240307201510'),
('20240307203039'),
('20240313192134'),
('20240313204105'),
('20240314141536'),
('20240314153017'),
('20240314205923'),
('20240316203721'),
('20240318183846'),
('20240319124212'),
('20240319144735');
2023-05-24 19:52:29 +00:00