From 75b01a2dfb0781860104f7da0714d8f82b24880f Mon Sep 17 00:00:00 2001 From: Loren Johnson Date: Tue, 12 Mar 2019 14:27:10 -0700 Subject: [PATCH 1/2] Add back search path after schema obliterates it --- migrations/schema.sql | 1016 +++++++++++++++++++++++------------------ test/setup/index.js | 3 +- 2 files changed, 574 insertions(+), 445 deletions(-) diff --git a/migrations/schema.sql b/migrations/schema.sql index 5e1ec9b03..af65af387 100644 --- a/migrations/schema.sql +++ b/migrations/schema.sql @@ -6,11 +6,10 @@ SET statement_timeout = 0; SET lock_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 client_min_messages = warning; -SET search_path = public, pg_catalog; - SET default_tablespace = ''; SET default_with_oids = false; @@ -19,7 +18,7 @@ SET default_with_oids = false; -- Name: activities; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE activities ( +CREATE TABLE public.activities ( id integer NOT NULL, actor_id bigint, reader_id bigint, @@ -32,7 +31,8 @@ CREATE TABLE activities ( community_id bigint, meta jsonb DEFAULT '{}'::jsonb, parent_comment_id bigint, - contribution_id bigint + contribution_id bigint, + project_contribution_id bigint ); @@ -40,7 +40,7 @@ CREATE TABLE activities ( -- Name: activity_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE activity_id_seq +CREATE SEQUENCE public.activity_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -52,14 +52,14 @@ CREATE SEQUENCE activity_id_seq -- Name: activity_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE activity_id_seq OWNED BY activities.id; +ALTER SEQUENCE public.activity_id_seq OWNED BY public.activities.id; -- -- Name: blocked_users; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE blocked_users ( +CREATE TABLE public.blocked_users ( id integer NOT NULL, user_id bigint, blocked_user_id bigint, @@ -72,7 +72,7 @@ CREATE TABLE blocked_users ( -- Name: blocked_users_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE blocked_users_id_seq +CREATE SEQUENCE public.blocked_users_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -84,14 +84,14 @@ CREATE SEQUENCE blocked_users_id_seq -- Name: blocked_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE blocked_users_id_seq OWNED BY blocked_users.id; +ALTER SEQUENCE public.blocked_users_id_seq OWNED BY public.blocked_users.id; -- -- Name: comment_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE comment_seq +CREATE SEQUENCE public.comment_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -103,8 +103,8 @@ CREATE SEQUENCE comment_seq -- Name: comments; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE comments ( - id bigint DEFAULT nextval('comment_seq'::regclass) NOT NULL, +CREATE TABLE public.comments ( + id bigint DEFAULT nextval('public.comment_seq'::regclass) NOT NULL, user_id bigint, post_id bigint, created_at timestamp without time zone, @@ -123,7 +123,7 @@ CREATE TABLE comments ( -- Name: comments_tags; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE comments_tags ( +CREATE TABLE public.comments_tags ( id integer NOT NULL, comment_id bigint, tag_id bigint, @@ -136,7 +136,7 @@ CREATE TABLE comments_tags ( -- Name: comments_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE comments_tags_id_seq +CREATE SEQUENCE public.comments_tags_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -148,14 +148,14 @@ CREATE SEQUENCE comments_tags_id_seq -- Name: comments_tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE comments_tags_id_seq OWNED BY comments_tags.id; +ALTER SEQUENCE public.comments_tags_id_seq OWNED BY public.comments_tags.id; -- -- Name: community_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE community_seq +CREATE SEQUENCE public.community_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -167,8 +167,8 @@ CREATE SEQUENCE community_seq -- Name: communities; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE communities ( - id bigint DEFAULT nextval('community_seq'::regclass) NOT NULL, +CREATE TABLE public.communities ( + id bigint DEFAULT nextval('public.community_seq'::regclass) NOT NULL, name character varying(255) NOT NULL, avatar_url character varying(255), background_url character varying(255), @@ -203,7 +203,7 @@ CREATE TABLE communities ( -- Name: communities_posts; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE communities_posts ( +CREATE TABLE public.communities_posts ( post_id bigint NOT NULL, community_id bigint NOT NULL, id integer NOT NULL, @@ -215,7 +215,7 @@ CREATE TABLE communities_posts ( -- Name: communities_tags; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE communities_tags ( +CREATE TABLE public.communities_tags ( id integer NOT NULL, community_id bigint, tag_id bigint, @@ -232,7 +232,7 @@ CREATE TABLE communities_tags ( -- Name: communities_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE communities_tags_id_seq +CREATE SEQUENCE public.communities_tags_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -244,14 +244,14 @@ CREATE SEQUENCE communities_tags_id_seq -- Name: communities_tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE communities_tags_id_seq OWNED BY communities_tags.id; +ALTER SEQUENCE public.communities_tags_id_seq OWNED BY public.communities_tags.id; -- -- Name: communities_users; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE communities_users ( +CREATE TABLE public.communities_users ( user_id bigint NOT NULL, community_id bigint NOT NULL, role smallint, @@ -270,7 +270,7 @@ CREATE TABLE communities_users ( -- Name: community_invite_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE community_invite_seq +CREATE SEQUENCE public.community_invite_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -282,8 +282,8 @@ CREATE SEQUENCE community_invite_seq -- Name: community_invites; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE community_invites ( - id bigint DEFAULT nextval('community_invite_seq'::regclass) NOT NULL, +CREATE TABLE public.community_invites ( + id bigint DEFAULT nextval('public.community_invite_seq'::regclass) NOT NULL, community_id bigint NOT NULL, created_at timestamp without time zone NOT NULL, invited_by_id bigint NOT NULL, @@ -306,7 +306,7 @@ CREATE TABLE community_invites ( -- Name: contributor_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE contributor_seq +CREATE SEQUENCE public.contributor_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -318,8 +318,8 @@ CREATE SEQUENCE contributor_seq -- Name: contributions; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE contributions ( - id bigint DEFAULT nextval('contributor_seq'::regclass) NOT NULL, +CREATE TABLE public.contributions ( + id bigint DEFAULT nextval('public.contributor_seq'::regclass) NOT NULL, post_id bigint NOT NULL, user_id bigint NOT NULL, contributed_at timestamp without time zone NOT NULL @@ -330,7 +330,7 @@ CREATE TABLE contributions ( -- Name: device_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE device_seq +CREATE SEQUENCE public.device_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -342,7 +342,7 @@ CREATE SEQUENCE device_seq -- Name: devices; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE devices ( +CREATE TABLE public.devices ( id bigint NOT NULL, user_id bigint, created_at timestamp with time zone, @@ -361,7 +361,7 @@ CREATE TABLE devices ( -- Name: devices_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE devices_id_seq +CREATE SEQUENCE public.devices_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -373,14 +373,14 @@ CREATE SEQUENCE devices_id_seq -- Name: devices_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE devices_id_seq OWNED BY devices.id; +ALTER SEQUENCE public.devices_id_seq OWNED BY public.devices.id; -- -- Name: event_responses; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE event_responses ( +CREATE TABLE public.event_responses ( id integer NOT NULL, user_id bigint, post_id bigint, @@ -394,7 +394,7 @@ CREATE TABLE event_responses ( -- Name: event_responses_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE event_responses_id_seq +CREATE SEQUENCE public.event_responses_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -406,14 +406,14 @@ CREATE SEQUENCE event_responses_id_seq -- Name: event_responses_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE event_responses_id_seq OWNED BY event_responses.id; +ALTER SEQUENCE public.event_responses_id_seq OWNED BY public.event_responses.id; -- -- Name: flagged_items; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE flagged_items ( +CREATE TABLE public.flagged_items ( id integer NOT NULL, user_id bigint, category character varying(255), @@ -428,7 +428,7 @@ CREATE TABLE flagged_items ( -- Name: flagged_items_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE flagged_items_id_seq +CREATE SEQUENCE public.flagged_items_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -440,14 +440,14 @@ CREATE SEQUENCE flagged_items_id_seq -- Name: flagged_items_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE flagged_items_id_seq OWNED BY flagged_items.id; +ALTER SEQUENCE public.flagged_items_id_seq OWNED BY public.flagged_items.id; -- -- Name: tag_follows; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE tag_follows ( +CREATE TABLE public.tag_follows ( id integer NOT NULL, community_id bigint, tag_id bigint, @@ -462,7 +462,7 @@ CREATE TABLE tag_follows ( -- Name: followed_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE followed_tags_id_seq +CREATE SEQUENCE public.followed_tags_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -474,14 +474,14 @@ CREATE SEQUENCE followed_tags_id_seq -- Name: followed_tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE followed_tags_id_seq OWNED BY tag_follows.id; +ALTER SEQUENCE public.followed_tags_id_seq OWNED BY public.tag_follows.id; -- -- Name: follower_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE follower_seq +CREATE SEQUENCE public.follower_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -493,8 +493,8 @@ CREATE SEQUENCE follower_seq -- Name: follows; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE follows ( - id bigint DEFAULT nextval('follower_seq'::regclass) NOT NULL, +CREATE TABLE public.follows ( + id bigint DEFAULT nextval('public.follower_seq'::regclass) NOT NULL, post_id bigint, added_at timestamp without time zone, user_id bigint, @@ -508,7 +508,7 @@ CREATE TABLE follows ( -- Name: group_connections; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE group_connections ( +CREATE TABLE public.group_connections ( id bigint NOT NULL, parent_group_id bigint NOT NULL, parent_group_data_type integer NOT NULL, @@ -526,7 +526,7 @@ CREATE TABLE group_connections ( -- Name: group_connections_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE group_connections_id_seq +CREATE SEQUENCE public.group_connections_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -538,14 +538,14 @@ CREATE SEQUENCE group_connections_id_seq -- Name: group_connections_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE group_connections_id_seq OWNED BY group_connections.id; +ALTER SEQUENCE public.group_connections_id_seq OWNED BY public.group_connections.id; -- -- Name: group_memberships; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE group_memberships ( +CREATE TABLE public.group_memberships ( id bigint NOT NULL, group_id bigint NOT NULL, user_id bigint NOT NULL, @@ -564,7 +564,7 @@ CREATE TABLE group_memberships ( -- Name: group_memberships_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE group_memberships_id_seq +CREATE SEQUENCE public.group_memberships_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -576,14 +576,14 @@ CREATE SEQUENCE group_memberships_id_seq -- Name: group_memberships_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE group_memberships_id_seq OWNED BY group_memberships.id; +ALTER SEQUENCE public.group_memberships_id_seq OWNED BY public.group_memberships.id; -- -- Name: groups; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE groups ( +CREATE TABLE public.groups ( id bigint NOT NULL, group_data_type integer NOT NULL, group_data_id bigint, @@ -597,7 +597,7 @@ CREATE TABLE groups ( -- Name: groups_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE groups_id_seq +CREATE SEQUENCE public.groups_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -609,14 +609,14 @@ CREATE SEQUENCE groups_id_seq -- Name: groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE groups_id_seq OWNED BY groups.id; +ALTER SEQUENCE public.groups_id_seq OWNED BY public.groups.id; -- -- Name: invite_request_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE invite_request_seq +CREATE SEQUENCE public.invite_request_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -628,7 +628,7 @@ CREATE SEQUENCE invite_request_seq -- Name: join_requests; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE join_requests ( +CREATE TABLE public.join_requests ( id integer NOT NULL, user_id bigint, community_id bigint, @@ -641,7 +641,7 @@ CREATE TABLE join_requests ( -- Name: join_requests_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE join_requests_id_seq +CREATE SEQUENCE public.join_requests_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -653,14 +653,14 @@ CREATE SEQUENCE join_requests_id_seq -- Name: join_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE join_requests_id_seq OWNED BY join_requests.id; +ALTER SEQUENCE public.join_requests_id_seq OWNED BY public.join_requests.id; -- -- Name: knex_migrations; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE knex_migrations ( +CREATE TABLE public.knex_migrations ( id integer NOT NULL, name character varying(255), batch integer, @@ -672,7 +672,7 @@ CREATE TABLE knex_migrations ( -- Name: knex_migrations_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE knex_migrations_id_seq +CREATE SEQUENCE public.knex_migrations_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -684,14 +684,14 @@ CREATE SEQUENCE knex_migrations_id_seq -- Name: knex_migrations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE knex_migrations_id_seq OWNED BY knex_migrations.id; +ALTER SEQUENCE public.knex_migrations_id_seq OWNED BY public.knex_migrations.id; -- -- Name: knex_migrations_lock; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE knex_migrations_lock ( +CREATE TABLE public.knex_migrations_lock ( is_locked integer ); @@ -700,7 +700,7 @@ CREATE TABLE knex_migrations_lock ( -- Name: link_previews; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE link_previews ( +CREATE TABLE public.link_previews ( id integer NOT NULL, url text, done boolean DEFAULT false, @@ -718,7 +718,7 @@ CREATE TABLE link_previews ( -- Name: link_previews_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE link_previews_id_seq +CREATE SEQUENCE public.link_previews_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -730,14 +730,14 @@ CREATE SEQUENCE link_previews_id_seq -- Name: link_previews_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE link_previews_id_seq OWNED BY link_previews.id; +ALTER SEQUENCE public.link_previews_id_seq OWNED BY public.link_previews.id; -- -- Name: linked_account_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE linked_account_seq +CREATE SEQUENCE public.linked_account_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -749,8 +749,8 @@ CREATE SEQUENCE linked_account_seq -- Name: linked_account; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE linked_account ( - id bigint DEFAULT nextval('linked_account_seq'::regclass) NOT NULL, +CREATE TABLE public.linked_account ( + id bigint DEFAULT nextval('public.linked_account_seq'::regclass) NOT NULL, user_id bigint, provider_user_id character varying(255), provider_key character varying(255) @@ -761,7 +761,7 @@ CREATE TABLE linked_account ( -- Name: media_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE media_seq +CREATE SEQUENCE public.media_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -773,8 +773,8 @@ CREATE SEQUENCE media_seq -- Name: media; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE media ( - id bigint DEFAULT nextval('media_seq'::regclass) NOT NULL, +CREATE TABLE public.media ( + id bigint DEFAULT nextval('public.media_seq'::regclass) NOT NULL, type character varying(255), url character varying(255), thumbnail_url character varying(255), @@ -792,7 +792,7 @@ CREATE TABLE media ( -- Name: networks; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE networks ( +CREATE TABLE public.networks ( id integer NOT NULL, name character varying(255), description text, @@ -808,7 +808,7 @@ CREATE TABLE networks ( -- Name: networks_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE networks_id_seq +CREATE SEQUENCE public.networks_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -820,14 +820,14 @@ CREATE SEQUENCE networks_id_seq -- Name: networks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE networks_id_seq OWNED BY networks.id; +ALTER SEQUENCE public.networks_id_seq OWNED BY public.networks.id; -- -- Name: networks_posts; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE networks_posts ( +CREATE TABLE public.networks_posts ( id integer NOT NULL, network_id bigint, post_id bigint @@ -838,7 +838,7 @@ CREATE TABLE networks_posts ( -- Name: networks_posts_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE networks_posts_id_seq +CREATE SEQUENCE public.networks_posts_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -850,14 +850,14 @@ CREATE SEQUENCE networks_posts_id_seq -- Name: networks_posts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE networks_posts_id_seq OWNED BY networks_posts.id; +ALTER SEQUENCE public.networks_posts_id_seq OWNED BY public.networks_posts.id; -- -- Name: networks_users; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE networks_users ( +CREATE TABLE public.networks_users ( id integer NOT NULL, network_id bigint, user_id bigint, @@ -871,7 +871,7 @@ CREATE TABLE networks_users ( -- Name: networks_users_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE networks_users_id_seq +CREATE SEQUENCE public.networks_users_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -883,14 +883,14 @@ CREATE SEQUENCE networks_users_id_seq -- Name: networks_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE networks_users_id_seq OWNED BY networks_users.id; +ALTER SEQUENCE public.networks_users_id_seq OWNED BY public.networks_users.id; -- -- Name: nexudus_accounts; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE nexudus_accounts ( +CREATE TABLE public.nexudus_accounts ( id integer NOT NULL, community_id bigint, space_id character varying(255), @@ -904,7 +904,7 @@ CREATE TABLE nexudus_accounts ( -- Name: nexudus_accounts_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE nexudus_accounts_id_seq +CREATE SEQUENCE public.nexudus_accounts_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -916,14 +916,14 @@ CREATE SEQUENCE nexudus_accounts_id_seq -- Name: nexudus_accounts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE nexudus_accounts_id_seq OWNED BY nexudus_accounts.id; +ALTER SEQUENCE public.nexudus_accounts_id_seq OWNED BY public.nexudus_accounts.id; -- -- Name: notification_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE notification_seq +CREATE SEQUENCE public.notification_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -935,7 +935,7 @@ CREATE SEQUENCE notification_seq -- Name: notification_status_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE notification_status_seq +CREATE SEQUENCE public.notification_status_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -947,7 +947,7 @@ CREATE SEQUENCE notification_status_seq -- Name: notifications; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE notifications ( +CREATE TABLE public.notifications ( id integer NOT NULL, activity_id bigint, sent_at timestamp with time zone, @@ -963,7 +963,7 @@ CREATE TABLE notifications ( -- Name: notifications_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE notifications_id_seq +CREATE SEQUENCE public.notifications_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -975,14 +975,14 @@ CREATE SEQUENCE notifications_id_seq -- Name: notifications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE notifications_id_seq OWNED BY notifications.id; +ALTER SEQUENCE public.notifications_id_seq OWNED BY public.notifications.id; -- -- Name: org_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE org_seq +CREATE SEQUENCE public.org_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -994,7 +994,7 @@ CREATE SEQUENCE org_seq -- Name: post_community_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE post_community_id_seq +CREATE SEQUENCE public.post_community_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1006,14 +1006,14 @@ CREATE SEQUENCE post_community_id_seq -- Name: post_community_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE post_community_id_seq OWNED BY communities_posts.id; +ALTER SEQUENCE public.post_community_id_seq OWNED BY public.communities_posts.id; -- -- Name: post_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE post_seq +CREATE SEQUENCE public.post_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1025,7 +1025,7 @@ CREATE SEQUENCE post_seq -- Name: post_view_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE post_view_seq +CREATE SEQUENCE public.post_view_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1037,8 +1037,8 @@ CREATE SEQUENCE post_view_seq -- Name: posts; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE posts ( - id bigint DEFAULT nextval('post_seq'::regclass) NOT NULL, +CREATE TABLE public.posts ( + id bigint DEFAULT nextval('public.post_seq'::regclass) NOT NULL, name text, description text, type character varying(255), @@ -1060,7 +1060,8 @@ CREATE TABLE posts ( parent_post_id bigint, link_preview_id bigint, is_project_request boolean DEFAULT false, - announcement boolean DEFAULT false + announcement boolean DEFAULT false, + accept_contributions boolean DEFAULT false ); @@ -1068,7 +1069,7 @@ CREATE TABLE posts ( -- Name: posts_about_users; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE posts_about_users ( +CREATE TABLE public.posts_about_users ( post_id bigint, user_id bigint ); @@ -1078,7 +1079,7 @@ CREATE TABLE posts_about_users ( -- Name: posts_tags; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE posts_tags ( +CREATE TABLE public.posts_tags ( id integer NOT NULL, post_id bigint, tag_id bigint, @@ -1092,7 +1093,7 @@ CREATE TABLE posts_tags ( -- Name: posts_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE posts_tags_id_seq +CREATE SEQUENCE public.posts_tags_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1104,14 +1105,14 @@ CREATE SEQUENCE posts_tags_id_seq -- Name: posts_tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE posts_tags_id_seq OWNED BY posts_tags.id; +ALTER SEQUENCE public.posts_tags_id_seq OWNED BY public.posts_tags.id; -- -- Name: posts_users; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE posts_users ( +CREATE TABLE public.posts_users ( id integer NOT NULL, user_id bigint, post_id bigint, @@ -1125,7 +1126,7 @@ CREATE TABLE posts_users ( -- Name: posts_users_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE posts_users_id_seq +CREATE SEQUENCE public.posts_users_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1137,14 +1138,47 @@ CREATE SEQUENCE posts_users_id_seq -- Name: posts_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE posts_users_id_seq OWNED BY posts_users.id; +ALTER SEQUENCE public.posts_users_id_seq OWNED BY public.posts_users.id; + + +-- +-- Name: project_contributions; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.project_contributions ( + id integer NOT NULL, + user_id bigint, + post_id bigint, + amount integer, + created_at timestamp with time zone, + updated_at timestamp with time zone +); + + +-- +-- Name: project_contributions_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.project_contributions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: project_contributions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.project_contributions_id_seq OWNED BY public.project_contributions.id; -- -- Name: project_roles; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE project_roles ( +CREATE TABLE public.project_roles ( id bigint NOT NULL, name character varying(255), post_id bigint @@ -1155,7 +1189,7 @@ CREATE TABLE project_roles ( -- Name: project_roles_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE project_roles_id_seq +CREATE SEQUENCE public.project_roles_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1167,14 +1201,14 @@ CREATE SEQUENCE project_roles_id_seq -- Name: project_roles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE project_roles_id_seq OWNED BY project_roles.id; +ALTER SEQUENCE public.project_roles_id_seq OWNED BY public.project_roles.id; -- -- Name: users_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE users_seq +CREATE SEQUENCE public.users_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1186,8 +1220,8 @@ CREATE SEQUENCE users_seq -- Name: users; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE users ( - id bigint DEFAULT nextval('users_seq'::regclass) NOT NULL, +CREATE TABLE public.users ( + id bigint DEFAULT nextval('public.users_seq'::regclass) NOT NULL, email character varying(255) NOT NULL, name character varying(255), avatar_url character varying(255), @@ -1211,7 +1245,8 @@ CREATE TABLE users ( settings jsonb DEFAULT '{}'::jsonb, location character varying(255), url character varying(255), - tagline character varying(255) + tagline character varying(255), + stripe_account_id bigint ); @@ -1219,7 +1254,7 @@ CREATE TABLE users ( -- Name: push_notification_testers; Type: VIEW; Schema: public; Owner: - -- -CREATE VIEW push_notification_testers AS +CREATE VIEW public.push_notification_testers AS SELECT u.id AS user_id, u.name, (u.settings -> 'dm_notifications'::text), @@ -1229,8 +1264,8 @@ CREATE VIEW push_notification_testers AS d.player_id, d.platform, d.tester - FROM (devices d - LEFT JOIN users u ON ((u.id = d.user_id))) + FROM (public.devices d + LEFT JOIN public.users u ON ((u.id = d.user_id))) WHERE (d.player_id IS NOT NULL) ORDER BY d.created_at; @@ -1239,7 +1274,7 @@ CREATE VIEW push_notification_testers AS -- Name: push_notifications; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE push_notifications ( +CREATE TABLE public.push_notifications ( id integer NOT NULL, queued_at timestamp with time zone, sent_at timestamp with time zone, @@ -1256,7 +1291,7 @@ CREATE TABLE push_notifications ( -- Name: queued_pushes_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE queued_pushes_id_seq +CREATE SEQUENCE public.queued_pushes_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1268,14 +1303,14 @@ CREATE SEQUENCE queued_pushes_id_seq -- Name: queued_pushes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE queued_pushes_id_seq OWNED BY push_notifications.id; +ALTER SEQUENCE public.queued_pushes_id_seq OWNED BY public.push_notifications.id; -- -- Name: security_role_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE security_role_seq +CREATE SEQUENCE public.security_role_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1287,7 +1322,7 @@ CREATE SEQUENCE security_role_seq -- Name: skill_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE skill_seq +CREATE SEQUENCE public.skill_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1299,7 +1334,7 @@ CREATE SEQUENCE skill_seq -- Name: skills; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE skills ( +CREATE TABLE public.skills ( id integer NOT NULL, name character varying(255) ); @@ -1309,7 +1344,7 @@ CREATE TABLE skills ( -- Name: skills_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE skills_id_seq +CREATE SEQUENCE public.skills_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1321,14 +1356,14 @@ CREATE SEQUENCE skills_id_seq -- Name: skills_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE skills_id_seq OWNED BY skills.id; +ALTER SEQUENCE public.skills_id_seq OWNED BY public.skills.id; -- -- Name: skills_users; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE skills_users ( +CREATE TABLE public.skills_users ( id integer NOT NULL, skill_id bigint, user_id bigint @@ -1339,7 +1374,7 @@ CREATE TABLE skills_users ( -- Name: skills_users_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE skills_users_id_seq +CREATE SEQUENCE public.skills_users_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1351,14 +1386,44 @@ CREATE SEQUENCE skills_users_id_seq -- Name: skills_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE skills_users_id_seq OWNED BY skills_users.id; +ALTER SEQUENCE public.skills_users_id_seq OWNED BY public.skills_users.id; + + +-- +-- Name: stripe_accounts; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.stripe_accounts ( + id bigint NOT NULL, + stripe_account_external_id character varying(255), + refresh_token character varying(255) +); + + +-- +-- Name: stripe_accounts_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.stripe_accounts_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: stripe_accounts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.stripe_accounts_id_seq OWNED BY public.stripe_accounts.id; -- -- Name: tags; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE tags ( +CREATE TABLE public.tags ( id bigint NOT NULL, name character varying(255) NOT NULL, created_at timestamp with time zone, @@ -1370,7 +1435,7 @@ CREATE TABLE tags ( -- Name: tags_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE tags_id_seq +CREATE SEQUENCE public.tags_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1382,14 +1447,14 @@ CREATE SEQUENCE tags_id_seq -- Name: tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE tags_id_seq OWNED BY tags.id; +ALTER SEQUENCE public.tags_id_seq OWNED BY public.tags.id; -- -- Name: thank_you_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE thank_you_seq +CREATE SEQUENCE public.thank_you_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1401,8 +1466,8 @@ CREATE SEQUENCE thank_you_seq -- Name: thanks; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE thanks ( - id bigint DEFAULT nextval('thank_you_seq'::regclass) NOT NULL, +CREATE TABLE public.thanks ( + id bigint DEFAULT nextval('public.thank_you_seq'::regclass) NOT NULL, comment_id bigint NOT NULL, date_thanked timestamp without time zone NOT NULL, user_id bigint NOT NULL, @@ -1414,7 +1479,7 @@ CREATE TABLE thanks ( -- Name: token_action_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE token_action_seq +CREATE SEQUENCE public.token_action_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1426,7 +1491,7 @@ CREATE SEQUENCE token_action_seq -- Name: user_connections; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE user_connections ( +CREATE TABLE public.user_connections ( id integer NOT NULL, user_id bigint, other_user_id bigint, @@ -1440,7 +1505,7 @@ CREATE TABLE user_connections ( -- Name: user_connections_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE user_connections_id_seq +CREATE SEQUENCE public.user_connections_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1452,14 +1517,14 @@ CREATE SEQUENCE user_connections_id_seq -- Name: user_connections_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE user_connections_id_seq OWNED BY user_connections.id; +ALTER SEQUENCE public.user_connections_id_seq OWNED BY public.user_connections.id; -- -- Name: user_external_data; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE user_external_data ( +CREATE TABLE public.user_external_data ( id bigint NOT NULL, user_id bigint, type character varying(255), @@ -1473,7 +1538,7 @@ CREATE TABLE user_external_data ( -- Name: user_external_data_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE user_external_data_id_seq +CREATE SEQUENCE public.user_external_data_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1485,14 +1550,14 @@ CREATE SEQUENCE user_external_data_id_seq -- Name: user_external_data_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE user_external_data_id_seq OWNED BY user_external_data.id; +ALTER SEQUENCE public.user_external_data_id_seq OWNED BY public.user_external_data.id; -- -- Name: user_permission_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE user_permission_seq +CREATE SEQUENCE public.user_permission_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1504,7 +1569,7 @@ CREATE SEQUENCE user_permission_seq -- Name: user_post_relevance_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE user_post_relevance_seq +CREATE SEQUENCE public.user_post_relevance_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1516,8 +1581,8 @@ CREATE SEQUENCE user_post_relevance_seq -- Name: user_post_relevance; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE user_post_relevance ( - id bigint DEFAULT nextval('user_post_relevance_seq'::regclass) NOT NULL, +CREATE TABLE public.user_post_relevance ( + id bigint DEFAULT nextval('public.user_post_relevance_seq'::regclass) NOT NULL, user_id bigint, post_id bigint, similarity real, @@ -1530,7 +1595,7 @@ CREATE TABLE user_post_relevance ( -- Name: users_community_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE users_community_id_seq +CREATE SEQUENCE public.users_community_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1542,14 +1607,14 @@ CREATE SEQUENCE users_community_id_seq -- Name: users_community_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE users_community_id_seq OWNED BY communities_users.id; +ALTER SEQUENCE public.users_community_id_seq OWNED BY public.communities_users.id; -- -- Name: vote_seq; Type: SEQUENCE; Schema: public; Owner: - -- -CREATE SEQUENCE vote_seq +CREATE SEQUENCE public.vote_seq START WITH 1 INCREMENT BY 1 NO MINVALUE @@ -1561,8 +1626,8 @@ CREATE SEQUENCE vote_seq -- Name: votes; Type: TABLE; Schema: public; Owner: - -- -CREATE TABLE votes ( - id bigint DEFAULT nextval('vote_seq'::regclass) NOT NULL, +CREATE TABLE public.votes ( + id bigint DEFAULT nextval('public.vote_seq'::regclass) NOT NULL, user_id bigint, post_id bigint, date_voted timestamp without time zone @@ -1573,217 +1638,231 @@ CREATE TABLE votes ( -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY activities ALTER COLUMN id SET DEFAULT nextval('activity_id_seq'::regclass); +ALTER TABLE ONLY public.activities ALTER COLUMN id SET DEFAULT nextval('public.activity_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.blocked_users ALTER COLUMN id SET DEFAULT nextval('public.blocked_users_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY blocked_users ALTER COLUMN id SET DEFAULT nextval('blocked_users_id_seq'::regclass); +ALTER TABLE ONLY public.comments_tags ALTER COLUMN id SET DEFAULT nextval('public.comments_tags_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY comments_tags ALTER COLUMN id SET DEFAULT nextval('comments_tags_id_seq'::regclass); +ALTER TABLE ONLY public.communities_posts ALTER COLUMN id SET DEFAULT nextval('public.post_community_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities_posts ALTER COLUMN id SET DEFAULT nextval('post_community_id_seq'::regclass); +ALTER TABLE ONLY public.communities_tags ALTER COLUMN id SET DEFAULT nextval('public.communities_tags_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities_tags ALTER COLUMN id SET DEFAULT nextval('communities_tags_id_seq'::regclass); +ALTER TABLE ONLY public.communities_users ALTER COLUMN id SET DEFAULT nextval('public.users_community_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities_users ALTER COLUMN id SET DEFAULT nextval('users_community_id_seq'::regclass); +ALTER TABLE ONLY public.devices ALTER COLUMN id SET DEFAULT nextval('public.devices_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY devices ALTER COLUMN id SET DEFAULT nextval('devices_id_seq'::regclass); +ALTER TABLE ONLY public.event_responses ALTER COLUMN id SET DEFAULT nextval('public.event_responses_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY event_responses ALTER COLUMN id SET DEFAULT nextval('event_responses_id_seq'::regclass); +ALTER TABLE ONLY public.flagged_items ALTER COLUMN id SET DEFAULT nextval('public.flagged_items_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY flagged_items ALTER COLUMN id SET DEFAULT nextval('flagged_items_id_seq'::regclass); +ALTER TABLE ONLY public.group_connections ALTER COLUMN id SET DEFAULT nextval('public.group_connections_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY group_connections ALTER COLUMN id SET DEFAULT nextval('group_connections_id_seq'::regclass); +ALTER TABLE ONLY public.group_memberships ALTER COLUMN id SET DEFAULT nextval('public.group_memberships_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY group_memberships ALTER COLUMN id SET DEFAULT nextval('group_memberships_id_seq'::regclass); +ALTER TABLE ONLY public.groups ALTER COLUMN id SET DEFAULT nextval('public.groups_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY groups ALTER COLUMN id SET DEFAULT nextval('groups_id_seq'::regclass); +ALTER TABLE ONLY public.join_requests ALTER COLUMN id SET DEFAULT nextval('public.join_requests_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY join_requests ALTER COLUMN id SET DEFAULT nextval('join_requests_id_seq'::regclass); +ALTER TABLE ONLY public.knex_migrations ALTER COLUMN id SET DEFAULT nextval('public.knex_migrations_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY knex_migrations ALTER COLUMN id SET DEFAULT nextval('knex_migrations_id_seq'::regclass); +ALTER TABLE ONLY public.link_previews ALTER COLUMN id SET DEFAULT nextval('public.link_previews_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY link_previews ALTER COLUMN id SET DEFAULT nextval('link_previews_id_seq'::regclass); +ALTER TABLE ONLY public.networks ALTER COLUMN id SET DEFAULT nextval('public.networks_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY networks ALTER COLUMN id SET DEFAULT nextval('networks_id_seq'::regclass); +ALTER TABLE ONLY public.networks_posts ALTER COLUMN id SET DEFAULT nextval('public.networks_posts_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY networks_posts ALTER COLUMN id SET DEFAULT nextval('networks_posts_id_seq'::regclass); +ALTER TABLE ONLY public.networks_users ALTER COLUMN id SET DEFAULT nextval('public.networks_users_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY networks_users ALTER COLUMN id SET DEFAULT nextval('networks_users_id_seq'::regclass); +ALTER TABLE ONLY public.nexudus_accounts ALTER COLUMN id SET DEFAULT nextval('public.nexudus_accounts_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY nexudus_accounts ALTER COLUMN id SET DEFAULT nextval('nexudus_accounts_id_seq'::regclass); +ALTER TABLE ONLY public.notifications ALTER COLUMN id SET DEFAULT nextval('public.notifications_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY notifications ALTER COLUMN id SET DEFAULT nextval('notifications_id_seq'::regclass); +ALTER TABLE ONLY public.posts_tags ALTER COLUMN id SET DEFAULT nextval('public.posts_tags_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY posts_tags ALTER COLUMN id SET DEFAULT nextval('posts_tags_id_seq'::regclass); +ALTER TABLE ONLY public.posts_users ALTER COLUMN id SET DEFAULT nextval('public.posts_users_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY posts_users ALTER COLUMN id SET DEFAULT nextval('posts_users_id_seq'::regclass); +ALTER TABLE ONLY public.project_contributions ALTER COLUMN id SET DEFAULT nextval('public.project_contributions_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY project_roles ALTER COLUMN id SET DEFAULT nextval('project_roles_id_seq'::regclass); +ALTER TABLE ONLY public.project_roles ALTER COLUMN id SET DEFAULT nextval('public.project_roles_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY push_notifications ALTER COLUMN id SET DEFAULT nextval('queued_pushes_id_seq'::regclass); +ALTER TABLE ONLY public.push_notifications ALTER COLUMN id SET DEFAULT nextval('public.queued_pushes_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY skills ALTER COLUMN id SET DEFAULT nextval('skills_id_seq'::regclass); +ALTER TABLE ONLY public.skills ALTER COLUMN id SET DEFAULT nextval('public.skills_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY skills_users ALTER COLUMN id SET DEFAULT nextval('skills_users_id_seq'::regclass); +ALTER TABLE ONLY public.skills_users ALTER COLUMN id SET DEFAULT nextval('public.skills_users_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY tag_follows ALTER COLUMN id SET DEFAULT nextval('followed_tags_id_seq'::regclass); +ALTER TABLE ONLY public.stripe_accounts ALTER COLUMN id SET DEFAULT nextval('public.stripe_accounts_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY tags ALTER COLUMN id SET DEFAULT nextval('tags_id_seq'::regclass); +ALTER TABLE ONLY public.tag_follows ALTER COLUMN id SET DEFAULT nextval('public.followed_tags_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY user_connections ALTER COLUMN id SET DEFAULT nextval('user_connections_id_seq'::regclass); +ALTER TABLE ONLY public.tags ALTER COLUMN id SET DEFAULT nextval('public.tags_id_seq'::regclass); -- -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY user_external_data ALTER COLUMN id SET DEFAULT nextval('user_external_data_id_seq'::regclass); +ALTER TABLE ONLY public.user_connections ALTER COLUMN id SET DEFAULT nextval('public.user_connections_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.user_external_data ALTER COLUMN id SET DEFAULT nextval('public.user_external_data_id_seq'::regclass); -- -- Name: pk_users; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY users +ALTER TABLE ONLY public.users ADD CONSTRAINT pk_users PRIMARY KEY (id); @@ -1791,22 +1870,22 @@ ALTER TABLE ONLY users -- Name: search_index; Type: MATERIALIZED VIEW; Schema: public; Owner: - -- -CREATE MATERIALIZED VIEW search_index AS +CREATE MATERIALIZED VIEW public.search_index AS SELECT p.id AS post_id, NULL::bigint AS user_id, NULL::bigint AS comment_id, ((setweight(to_tsvector('english'::regconfig, p.name), 'B'::"char") || setweight(to_tsvector('english'::regconfig, COALESCE(p.description, ''::text)), 'C'::"char")) || setweight(to_tsvector('english'::regconfig, (u.name)::text), 'D'::"char")) AS document - FROM (posts p - JOIN users u ON ((u.id = p.user_id))) + FROM (public.posts p + JOIN public.users u ON ((u.id = p.user_id))) WHERE ((p.active = true) AND (u.active = true)) UNION SELECT NULL::bigint AS post_id, u.id AS user_id, NULL::bigint AS comment_id, ((setweight(to_tsvector('english'::regconfig, (u.name)::text), 'A'::"char") || setweight(to_tsvector('english'::regconfig, COALESCE(string_agg(replace((s.name)::text, '-'::text, ' '::text), ' '::text), ''::text)), 'C'::"char")) || setweight(to_tsvector('english'::regconfig, COALESCE(u.bio, ''::text)), 'C'::"char")) AS document - FROM ((users u - LEFT JOIN skills_users su ON ((u.id = su.user_id))) - LEFT JOIN skills s ON ((su.skill_id = s.id))) + FROM ((public.users u + LEFT JOIN public.skills_users su ON ((u.id = su.user_id))) + LEFT JOIN public.skills s ON ((su.skill_id = s.id))) WHERE (u.active = true) GROUP BY u.id UNION @@ -1814,8 +1893,8 @@ UNION NULL::bigint AS user_id, c.id AS comment_id, (setweight(to_tsvector('english'::regconfig, c.text), 'C'::"char") || setweight(to_tsvector('english'::regconfig, (u.name)::text), 'D'::"char")) AS document - FROM (comments c - JOIN users u ON ((u.id = c.user_id))) + FROM (public.comments c + JOIN public.users u ON ((u.id = c.user_id))) WHERE ((c.active = true) AND (u.active = true)) WITH NO DATA; @@ -1824,7 +1903,7 @@ UNION -- Name: activity_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY activities +ALTER TABLE ONLY public.activities ADD CONSTRAINT activity_pkey PRIMARY KEY (id); @@ -1832,7 +1911,7 @@ ALTER TABLE ONLY activities -- Name: blocked_users_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY blocked_users +ALTER TABLE ONLY public.blocked_users ADD CONSTRAINT blocked_users_pkey PRIMARY KEY (id); @@ -1840,7 +1919,7 @@ ALTER TABLE ONLY blocked_users -- Name: comments_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY comments_tags +ALTER TABLE ONLY public.comments_tags ADD CONSTRAINT comments_tags_pkey PRIMARY KEY (id); @@ -1848,7 +1927,7 @@ ALTER TABLE ONLY comments_tags -- Name: communities_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities_tags +ALTER TABLE ONLY public.communities_tags ADD CONSTRAINT communities_tags_pkey PRIMARY KEY (id); @@ -1856,7 +1935,7 @@ ALTER TABLE ONLY communities_tags -- Name: devices_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY devices +ALTER TABLE ONLY public.devices ADD CONSTRAINT devices_pkey PRIMARY KEY (id); @@ -1864,7 +1943,7 @@ ALTER TABLE ONLY devices -- Name: event_responses_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY event_responses +ALTER TABLE ONLY public.event_responses ADD CONSTRAINT event_responses_pkey PRIMARY KEY (id); @@ -1872,7 +1951,7 @@ ALTER TABLE ONLY event_responses -- Name: event_responses_user_id_post_id_unique; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY event_responses +ALTER TABLE ONLY public.event_responses ADD CONSTRAINT event_responses_user_id_post_id_unique UNIQUE (user_id, post_id); @@ -1880,7 +1959,7 @@ ALTER TABLE ONLY event_responses -- Name: flagged_items_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY flagged_items +ALTER TABLE ONLY public.flagged_items ADD CONSTRAINT flagged_items_pkey PRIMARY KEY (id); @@ -1888,7 +1967,7 @@ ALTER TABLE ONLY flagged_items -- Name: followed_tags_community_id_tag_id_user_id_unique; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY tag_follows +ALTER TABLE ONLY public.tag_follows ADD CONSTRAINT followed_tags_community_id_tag_id_user_id_unique UNIQUE (community_id, tag_id, user_id); @@ -1896,7 +1975,7 @@ ALTER TABLE ONLY tag_follows -- Name: followed_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY tag_follows +ALTER TABLE ONLY public.tag_follows ADD CONSTRAINT followed_tags_pkey PRIMARY KEY (id); @@ -1904,7 +1983,7 @@ ALTER TABLE ONLY tag_follows -- Name: group_connections_parent_group_id_child_group_id_unique; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY group_connections +ALTER TABLE ONLY public.group_connections ADD CONSTRAINT group_connections_parent_group_id_child_group_id_unique UNIQUE (parent_group_id, child_group_id); @@ -1912,7 +1991,7 @@ ALTER TABLE ONLY group_connections -- Name: group_connections_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY group_connections +ALTER TABLE ONLY public.group_connections ADD CONSTRAINT group_connections_pkey PRIMARY KEY (id); @@ -1920,7 +1999,7 @@ ALTER TABLE ONLY group_connections -- Name: group_memberships_group_id_user_id_unique; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY group_memberships +ALTER TABLE ONLY public.group_memberships ADD CONSTRAINT group_memberships_group_id_user_id_unique UNIQUE (group_id, user_id); @@ -1928,7 +2007,7 @@ ALTER TABLE ONLY group_memberships -- Name: group_memberships_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY group_memberships +ALTER TABLE ONLY public.group_memberships ADD CONSTRAINT group_memberships_pkey PRIMARY KEY (id); @@ -1936,7 +2015,7 @@ ALTER TABLE ONLY group_memberships -- Name: groups_group_data_id_group_data_type_unique; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY groups +ALTER TABLE ONLY public.groups ADD CONSTRAINT groups_group_data_id_group_data_type_unique UNIQUE (group_data_id, group_data_type); @@ -1944,7 +2023,7 @@ ALTER TABLE ONLY groups -- Name: groups_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY groups +ALTER TABLE ONLY public.groups ADD CONSTRAINT groups_pkey PRIMARY KEY (id); @@ -1952,7 +2031,7 @@ ALTER TABLE ONLY groups -- Name: join_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY join_requests +ALTER TABLE ONLY public.join_requests ADD CONSTRAINT join_requests_pkey PRIMARY KEY (id); @@ -1960,7 +2039,7 @@ ALTER TABLE ONLY join_requests -- Name: knex_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY knex_migrations +ALTER TABLE ONLY public.knex_migrations ADD CONSTRAINT knex_migrations_pkey PRIMARY KEY (id); @@ -1968,7 +2047,7 @@ ALTER TABLE ONLY knex_migrations -- Name: link_previews_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY link_previews +ALTER TABLE ONLY public.link_previews ADD CONSTRAINT link_previews_pkey PRIMARY KEY (id); @@ -1976,7 +2055,7 @@ ALTER TABLE ONLY link_previews -- Name: link_previews_url_unique; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY link_previews +ALTER TABLE ONLY public.link_previews ADD CONSTRAINT link_previews_url_unique UNIQUE (url); @@ -1984,7 +2063,7 @@ ALTER TABLE ONLY link_previews -- Name: network_id_post_id_key; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY networks_posts +ALTER TABLE ONLY public.networks_posts ADD CONSTRAINT network_id_post_id_key UNIQUE (network_id, post_id); @@ -1992,7 +2071,7 @@ ALTER TABLE ONLY networks_posts -- Name: networks_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY networks +ALTER TABLE ONLY public.networks ADD CONSTRAINT networks_pkey PRIMARY KEY (id); @@ -2000,7 +2079,7 @@ ALTER TABLE ONLY networks -- Name: networks_posts_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY networks_posts +ALTER TABLE ONLY public.networks_posts ADD CONSTRAINT networks_posts_pkey PRIMARY KEY (id); @@ -2008,7 +2087,7 @@ ALTER TABLE ONLY networks_posts -- Name: networks_slug_unique; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY networks +ALTER TABLE ONLY public.networks ADD CONSTRAINT networks_slug_unique UNIQUE (slug); @@ -2016,7 +2095,7 @@ ALTER TABLE ONLY networks -- Name: networks_users_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY networks_users +ALTER TABLE ONLY public.networks_users ADD CONSTRAINT networks_users_pkey PRIMARY KEY (id); @@ -2024,7 +2103,7 @@ ALTER TABLE ONLY networks_users -- Name: nexudus_accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY nexudus_accounts +ALTER TABLE ONLY public.nexudus_accounts ADD CONSTRAINT nexudus_accounts_pkey PRIMARY KEY (id); @@ -2032,7 +2111,7 @@ ALTER TABLE ONLY nexudus_accounts -- Name: notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY notifications +ALTER TABLE ONLY public.notifications ADD CONSTRAINT notifications_pkey PRIMARY KEY (id); @@ -2040,7 +2119,7 @@ ALTER TABLE ONLY notifications -- Name: pk_comment; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY comments +ALTER TABLE ONLY public.comments ADD CONSTRAINT pk_comment PRIMARY KEY (id); @@ -2048,7 +2127,7 @@ ALTER TABLE ONLY comments -- Name: pk_community; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities +ALTER TABLE ONLY public.communities ADD CONSTRAINT pk_community PRIMARY KEY (id); @@ -2056,7 +2135,7 @@ ALTER TABLE ONLY communities -- Name: pk_community_invite; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY community_invites +ALTER TABLE ONLY public.community_invites ADD CONSTRAINT pk_community_invite PRIMARY KEY (id); @@ -2064,7 +2143,7 @@ ALTER TABLE ONLY community_invites -- Name: pk_contributor; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY contributions +ALTER TABLE ONLY public.contributions ADD CONSTRAINT pk_contributor PRIMARY KEY (id); @@ -2072,7 +2151,7 @@ ALTER TABLE ONLY contributions -- Name: pk_follower; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY follows +ALTER TABLE ONLY public.follows ADD CONSTRAINT pk_follower PRIMARY KEY (id); @@ -2080,7 +2159,7 @@ ALTER TABLE ONLY follows -- Name: pk_linked_account; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY linked_account +ALTER TABLE ONLY public.linked_account ADD CONSTRAINT pk_linked_account PRIMARY KEY (id); @@ -2088,7 +2167,7 @@ ALTER TABLE ONLY linked_account -- Name: pk_media; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY media +ALTER TABLE ONLY public.media ADD CONSTRAINT pk_media PRIMARY KEY (id); @@ -2096,7 +2175,7 @@ ALTER TABLE ONLY media -- Name: pk_post; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY posts +ALTER TABLE ONLY public.posts ADD CONSTRAINT pk_post PRIMARY KEY (id); @@ -2104,7 +2183,7 @@ ALTER TABLE ONLY posts -- Name: pk_thank_you; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY thanks +ALTER TABLE ONLY public.thanks ADD CONSTRAINT pk_thank_you PRIMARY KEY (id); @@ -2112,7 +2191,7 @@ ALTER TABLE ONLY thanks -- Name: pk_user_post_relevance; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY user_post_relevance +ALTER TABLE ONLY public.user_post_relevance ADD CONSTRAINT pk_user_post_relevance PRIMARY KEY (id); @@ -2120,7 +2199,7 @@ ALTER TABLE ONLY user_post_relevance -- Name: pk_vote; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY votes +ALTER TABLE ONLY public.votes ADD CONSTRAINT pk_vote PRIMARY KEY (id); @@ -2128,7 +2207,7 @@ ALTER TABLE ONLY votes -- Name: post_community_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities_posts +ALTER TABLE ONLY public.communities_posts ADD CONSTRAINT post_community_pkey PRIMARY KEY (id); @@ -2136,7 +2215,7 @@ ALTER TABLE ONLY communities_posts -- Name: post_community_unique; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities_posts +ALTER TABLE ONLY public.communities_posts ADD CONSTRAINT post_community_unique UNIQUE (post_id, community_id); @@ -2144,7 +2223,7 @@ ALTER TABLE ONLY communities_posts -- Name: posts_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY posts_tags +ALTER TABLE ONLY public.posts_tags ADD CONSTRAINT posts_tags_pkey PRIMARY KEY (id); @@ -2152,15 +2231,23 @@ ALTER TABLE ONLY posts_tags -- Name: posts_users_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY posts_users +ALTER TABLE ONLY public.posts_users ADD CONSTRAINT posts_users_pkey PRIMARY KEY (id); +-- +-- Name: project_contributions_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.project_contributions + ADD CONSTRAINT project_contributions_pkey PRIMARY KEY (id); + + -- -- Name: project_roles_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY project_roles +ALTER TABLE ONLY public.project_roles ADD CONSTRAINT project_roles_pkey PRIMARY KEY (id); @@ -2168,7 +2255,7 @@ ALTER TABLE ONLY project_roles -- Name: queued_pushes_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY push_notifications +ALTER TABLE ONLY public.push_notifications ADD CONSTRAINT queued_pushes_pkey PRIMARY KEY (id); @@ -2176,7 +2263,7 @@ ALTER TABLE ONLY push_notifications -- Name: skills_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY skills +ALTER TABLE ONLY public.skills ADD CONSTRAINT skills_name_unique UNIQUE (name); @@ -2184,7 +2271,7 @@ ALTER TABLE ONLY skills -- Name: skills_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY skills +ALTER TABLE ONLY public.skills ADD CONSTRAINT skills_pkey PRIMARY KEY (id); @@ -2192,7 +2279,7 @@ ALTER TABLE ONLY skills -- Name: skills_users_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY skills_users +ALTER TABLE ONLY public.skills_users ADD CONSTRAINT skills_users_pkey PRIMARY KEY (id); @@ -2200,15 +2287,23 @@ ALTER TABLE ONLY skills_users -- Name: skills_users_skill_id_user_id_unique; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY skills_users +ALTER TABLE ONLY public.skills_users ADD CONSTRAINT skills_users_skill_id_user_id_unique UNIQUE (skill_id, user_id); +-- +-- Name: stripe_accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.stripe_accounts + ADD CONSTRAINT stripe_accounts_pkey PRIMARY KEY (id); + + -- -- Name: tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY tags +ALTER TABLE ONLY public.tags ADD CONSTRAINT tags_pkey PRIMARY KEY (id); @@ -2216,7 +2311,7 @@ ALTER TABLE ONLY tags -- Name: unique_beta_access_code; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities +ALTER TABLE ONLY public.communities ADD CONSTRAINT unique_beta_access_code UNIQUE (beta_access_code); @@ -2224,7 +2319,7 @@ ALTER TABLE ONLY communities -- Name: unique_comments_tags; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY comments_tags +ALTER TABLE ONLY public.comments_tags ADD CONSTRAINT unique_comments_tags UNIQUE (comment_id, tag_id); @@ -2232,7 +2327,7 @@ ALTER TABLE ONLY comments_tags -- Name: unique_communities_tags; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities_tags +ALTER TABLE ONLY public.communities_tags ADD CONSTRAINT unique_communities_tags UNIQUE (community_id, tag_id); @@ -2240,7 +2335,7 @@ ALTER TABLE ONLY communities_tags -- Name: unique_email; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY users +ALTER TABLE ONLY public.users ADD CONSTRAINT unique_email UNIQUE (email); @@ -2248,7 +2343,7 @@ ALTER TABLE ONLY users -- Name: unique_follows; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY follows +ALTER TABLE ONLY public.follows ADD CONSTRAINT unique_follows UNIQUE (post_id, comment_id, user_id); @@ -2256,7 +2351,7 @@ ALTER TABLE ONLY follows -- Name: unique_join_requests; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY join_requests +ALTER TABLE ONLY public.join_requests ADD CONSTRAINT unique_join_requests UNIQUE (user_id, community_id); @@ -2264,7 +2359,7 @@ ALTER TABLE ONLY join_requests -- Name: unique_name; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY tags +ALTER TABLE ONLY public.tags ADD CONSTRAINT unique_name UNIQUE (name); @@ -2272,7 +2367,7 @@ ALTER TABLE ONLY tags -- Name: unique_posts_tags; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY posts_tags +ALTER TABLE ONLY public.posts_tags ADD CONSTRAINT unique_posts_tags UNIQUE (post_id, tag_id); @@ -2280,7 +2375,7 @@ ALTER TABLE ONLY posts_tags -- Name: uq_community_1; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities +ALTER TABLE ONLY public.communities ADD CONSTRAINT uq_community_1 UNIQUE (name); @@ -2288,7 +2383,7 @@ ALTER TABLE ONLY communities -- Name: uq_community_2; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities +ALTER TABLE ONLY public.communities ADD CONSTRAINT uq_community_2 UNIQUE (slug); @@ -2296,7 +2391,7 @@ ALTER TABLE ONLY communities -- Name: uq_no_multiple_contributor_2; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY contributions +ALTER TABLE ONLY public.contributions ADD CONSTRAINT uq_no_multiple_contributor_2 UNIQUE (post_id, user_id); @@ -2304,7 +2399,7 @@ ALTER TABLE ONLY contributions -- Name: uq_no_multiple_thankyous_2; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY thanks +ALTER TABLE ONLY public.thanks ADD CONSTRAINT uq_no_multiple_thankyous_2 UNIQUE (comment_id, user_id, thanked_by_id); @@ -2312,7 +2407,7 @@ ALTER TABLE ONLY thanks -- Name: uq_no_multiple_tokens; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY community_invites +ALTER TABLE ONLY public.community_invites ADD CONSTRAINT uq_no_multiple_tokens UNIQUE (token); @@ -2320,7 +2415,7 @@ ALTER TABLE ONLY community_invites -- Name: uq_vote_1; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY votes +ALTER TABLE ONLY public.votes ADD CONSTRAINT uq_vote_1 UNIQUE (user_id, post_id); @@ -2328,7 +2423,7 @@ ALTER TABLE ONLY votes -- Name: user_community_unique; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities_users +ALTER TABLE ONLY public.communities_users ADD CONSTRAINT user_community_unique UNIQUE (user_id, community_id); @@ -2336,7 +2431,7 @@ ALTER TABLE ONLY communities_users -- Name: user_connections_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY user_connections +ALTER TABLE ONLY public.user_connections ADD CONSTRAINT user_connections_pkey PRIMARY KEY (id); @@ -2344,7 +2439,7 @@ ALTER TABLE ONLY user_connections -- Name: user_external_data_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY user_external_data +ALTER TABLE ONLY public.user_external_data ADD CONSTRAINT user_external_data_pkey PRIMARY KEY (id); @@ -2352,7 +2447,7 @@ ALTER TABLE ONLY user_external_data -- Name: user_id_post_id_unique; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY user_post_relevance +ALTER TABLE ONLY public.user_post_relevance ADD CONSTRAINT user_id_post_id_unique UNIQUE (user_id, post_id); @@ -2360,7 +2455,7 @@ ALTER TABLE ONLY user_post_relevance -- Name: users_community_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities_users +ALTER TABLE ONLY public.communities_users ADD CONSTRAINT users_community_pkey PRIMARY KEY (id); @@ -2368,830 +2463,863 @@ ALTER TABLE ONLY communities_users -- Name: fk_community_created_by_1; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX fk_community_created_by_1 ON communities USING btree (created_by_id); +CREATE INDEX fk_community_created_by_1 ON public.communities USING btree (created_by_id); -- -- Name: idx_fts_search; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX idx_fts_search ON search_index USING gin (document); +CREATE INDEX idx_fts_search ON public.search_index USING gin (document); -- -- Name: ix_comment_post_2; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX ix_comment_post_2 ON comments USING btree (post_id); +CREATE INDEX ix_comment_post_2 ON public.comments USING btree (post_id); -- -- Name: ix_comment_user_1; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX ix_comment_user_1 ON comments USING btree (user_id); +CREATE INDEX ix_comment_user_1 ON public.comments USING btree (user_id); -- -- Name: ix_community_invite_community_1; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX ix_community_invite_community_1 ON community_invites USING btree (community_id); +CREATE INDEX ix_community_invite_community_1 ON public.community_invites USING btree (community_id); -- -- Name: ix_community_invite_invited_by_3; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX ix_community_invite_invited_by_3 ON community_invites USING btree (invited_by_id); +CREATE INDEX ix_community_invite_invited_by_3 ON public.community_invites USING btree (invited_by_id); -- -- Name: ix_community_invite_used_by_2; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX ix_community_invite_used_by_2 ON community_invites USING btree (used_by_id); +CREATE INDEX ix_community_invite_used_by_2 ON public.community_invites USING btree (used_by_id); -- -- Name: ix_contributor_post_1; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX ix_contributor_post_1 ON contributions USING btree (post_id); +CREATE INDEX ix_contributor_post_1 ON public.contributions USING btree (post_id); -- -- Name: ix_contributor_user_2; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX ix_contributor_user_2 ON contributions USING btree (user_id); +CREATE INDEX ix_contributor_user_2 ON public.contributions USING btree (user_id); -- -- Name: ix_follower_addedby_3; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX ix_follower_addedby_3 ON follows USING btree (added_by_id); +CREATE INDEX ix_follower_addedby_3 ON public.follows USING btree (added_by_id); -- -- Name: ix_follower_post_1; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX ix_follower_post_1 ON follows USING btree (post_id); +CREATE INDEX ix_follower_post_1 ON public.follows USING btree (post_id); -- -- Name: ix_follower_user_2; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX ix_follower_user_2 ON follows USING btree (user_id); +CREATE INDEX ix_follower_user_2 ON public.follows USING btree (user_id); -- -- Name: ix_linked_account_user_4; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX ix_linked_account_user_4 ON linked_account USING btree (user_id); +CREATE INDEX ix_linked_account_user_4 ON public.linked_account USING btree (user_id); -- -- Name: ix_media_post_1; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX ix_media_post_1 ON media USING btree (post_id); +CREATE INDEX ix_media_post_1 ON public.media USING btree (post_id); -- -- Name: ix_post_creator_11; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX ix_post_creator_11 ON posts USING btree (user_id); +CREATE INDEX ix_post_creator_11 ON public.posts USING btree (user_id); -- -- Name: ix_thank_you_comment_1; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX ix_thank_you_comment_1 ON thanks USING btree (comment_id); +CREATE INDEX ix_thank_you_comment_1 ON public.thanks USING btree (comment_id); -- -- Name: ix_thank_you_thanked_by_3; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX ix_thank_you_thanked_by_3 ON thanks USING btree (thanked_by_id); +CREATE INDEX ix_thank_you_thanked_by_3 ON public.thanks USING btree (thanked_by_id); -- -- Name: ix_thank_you_user_2; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX ix_thank_you_user_2 ON thanks USING btree (user_id); +CREATE INDEX ix_thank_you_user_2 ON public.thanks USING btree (user_id); -- -- Name: ix_vote_post_14; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX ix_vote_post_14 ON votes USING btree (post_id); +CREATE INDEX ix_vote_post_14 ON public.votes USING btree (post_id); -- -- Name: ix_vote_user_13; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX ix_vote_user_13 ON votes USING btree (user_id); +CREATE INDEX ix_vote_user_13 ON public.votes USING btree (user_id); -- -- Name: notifications_pk_medium_0; Type: INDEX; Schema: public; Owner: - -- -CREATE INDEX notifications_pk_medium_0 ON notifications USING btree (id) WHERE (medium = 0); +CREATE INDEX notifications_pk_medium_0 ON public.notifications USING btree (id) WHERE (medium = 0); -- -- Name: activities_contribution_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY activities - ADD CONSTRAINT activities_contribution_id_foreign FOREIGN KEY (contribution_id) REFERENCES contributions(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.activities + ADD CONSTRAINT activities_contribution_id_foreign FOREIGN KEY (contribution_id) REFERENCES public.contributions(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: activities_parent_comment_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY activities - ADD CONSTRAINT activities_parent_comment_id_foreign FOREIGN KEY (parent_comment_id) REFERENCES comments(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.activities + ADD CONSTRAINT activities_parent_comment_id_foreign FOREIGN KEY (parent_comment_id) REFERENCES public.comments(id) DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: activities_project_contribution_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.activities + ADD CONSTRAINT activities_project_contribution_id_foreign FOREIGN KEY (project_contribution_id) REFERENCES public.project_contributions(id); -- -- Name: activity_actor_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY activities - ADD CONSTRAINT activity_actor_id_foreign FOREIGN KEY (actor_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.activities + ADD CONSTRAINT activity_actor_id_foreign FOREIGN KEY (actor_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: activity_comment_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY activities - ADD CONSTRAINT activity_comment_id_foreign FOREIGN KEY (comment_id) REFERENCES comments(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.activities + ADD CONSTRAINT activity_comment_id_foreign FOREIGN KEY (comment_id) REFERENCES public.comments(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: activity_community_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY activities - ADD CONSTRAINT activity_community_id_foreign FOREIGN KEY (community_id) REFERENCES communities(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.activities + ADD CONSTRAINT activity_community_id_foreign FOREIGN KEY (community_id) REFERENCES public.communities(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: activity_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY activities - ADD CONSTRAINT activity_post_id_foreign FOREIGN KEY (post_id) REFERENCES posts(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.activities + ADD CONSTRAINT activity_post_id_foreign FOREIGN KEY (post_id) REFERENCES public.posts(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: activity_reader_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY activities - ADD CONSTRAINT activity_reader_id_foreign FOREIGN KEY (reader_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.activities + ADD CONSTRAINT activity_reader_id_foreign FOREIGN KEY (reader_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: blocked_users_blocked_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY blocked_users - ADD CONSTRAINT blocked_users_blocked_user_id_foreign FOREIGN KEY (blocked_user_id) REFERENCES users(id); +ALTER TABLE ONLY public.blocked_users + ADD CONSTRAINT blocked_users_blocked_user_id_foreign FOREIGN KEY (blocked_user_id) REFERENCES public.users(id); -- -- Name: blocked_users_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY blocked_users - ADD CONSTRAINT blocked_users_user_id_foreign FOREIGN KEY (user_id) REFERENCES users(id); +ALTER TABLE ONLY public.blocked_users + ADD CONSTRAINT blocked_users_user_id_foreign FOREIGN KEY (user_id) REFERENCES public.users(id); -- -- Name: comments_comment_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY comments - ADD CONSTRAINT comments_comment_id_foreign FOREIGN KEY (comment_id) REFERENCES comments(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.comments + ADD CONSTRAINT comments_comment_id_foreign FOREIGN KEY (comment_id) REFERENCES public.comments(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: comments_tags_comment_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY comments_tags - ADD CONSTRAINT comments_tags_comment_id_foreign FOREIGN KEY (comment_id) REFERENCES comments(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.comments_tags + ADD CONSTRAINT comments_tags_comment_id_foreign FOREIGN KEY (comment_id) REFERENCES public.comments(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: comments_tags_tag_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY comments_tags - ADD CONSTRAINT comments_tags_tag_id_foreign FOREIGN KEY (tag_id) REFERENCES tags(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.comments_tags + ADD CONSTRAINT comments_tags_tag_id_foreign FOREIGN KEY (tag_id) REFERENCES public.tags(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: communities_tags_community_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities_tags - ADD CONSTRAINT communities_tags_community_id_foreign FOREIGN KEY (community_id) REFERENCES communities(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.communities_tags + ADD CONSTRAINT communities_tags_community_id_foreign FOREIGN KEY (community_id) REFERENCES public.communities(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: communities_tags_owner_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities_tags - ADD CONSTRAINT communities_tags_owner_id_foreign FOREIGN KEY (user_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.communities_tags + ADD CONSTRAINT communities_tags_owner_id_foreign FOREIGN KEY (user_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: communities_tags_tag_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities_tags - ADD CONSTRAINT communities_tags_tag_id_foreign FOREIGN KEY (tag_id) REFERENCES tags(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.communities_tags + ADD CONSTRAINT communities_tags_tag_id_foreign FOREIGN KEY (tag_id) REFERENCES public.tags(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: community_invite_tag_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY community_invites - ADD CONSTRAINT community_invite_tag_id_foreign FOREIGN KEY (tag_id) REFERENCES tags(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.community_invites + ADD CONSTRAINT community_invite_tag_id_foreign FOREIGN KEY (tag_id) REFERENCES public.tags(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: community_invites_expired_by_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY community_invites - ADD CONSTRAINT community_invites_expired_by_id_foreign FOREIGN KEY (expired_by_id) REFERENCES users(id); +ALTER TABLE ONLY public.community_invites + ADD CONSTRAINT community_invites_expired_by_id_foreign FOREIGN KEY (expired_by_id) REFERENCES public.users(id); -- -- Name: community_leader_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities - ADD CONSTRAINT community_leader_id_foreign FOREIGN KEY (leader_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.communities + ADD CONSTRAINT community_leader_id_foreign FOREIGN KEY (leader_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: community_network_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities - ADD CONSTRAINT community_network_id_foreign FOREIGN KEY (network_id) REFERENCES networks(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.communities + ADD CONSTRAINT community_network_id_foreign FOREIGN KEY (network_id) REFERENCES public.networks(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: devices_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY devices - ADD CONSTRAINT devices_user_id_foreign FOREIGN KEY (user_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.devices + ADD CONSTRAINT devices_user_id_foreign FOREIGN KEY (user_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: event_responses_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY event_responses - ADD CONSTRAINT event_responses_post_id_foreign FOREIGN KEY (post_id) REFERENCES posts(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.event_responses + ADD CONSTRAINT event_responses_post_id_foreign FOREIGN KEY (post_id) REFERENCES public.posts(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: event_responses_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY event_responses - ADD CONSTRAINT event_responses_user_id_foreign FOREIGN KEY (user_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.event_responses + ADD CONSTRAINT event_responses_user_id_foreign FOREIGN KEY (user_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_comment_deactivated_by_01; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY comments - ADD CONSTRAINT fk_comment_deactivated_by_01 FOREIGN KEY (deactivated_by_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.comments + ADD CONSTRAINT fk_comment_deactivated_by_01 FOREIGN KEY (deactivated_by_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_comment_post_2; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY comments - ADD CONSTRAINT fk_comment_post_2 FOREIGN KEY (post_id) REFERENCES posts(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.comments + ADD CONSTRAINT fk_comment_post_2 FOREIGN KEY (post_id) REFERENCES public.posts(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_comment_user_1; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY comments - ADD CONSTRAINT fk_comment_user_1 FOREIGN KEY (user_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.comments + ADD CONSTRAINT fk_comment_user_1 FOREIGN KEY (user_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_community_created_by_1; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities - ADD CONSTRAINT fk_community_created_by_1 FOREIGN KEY (created_by_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.communities + ADD CONSTRAINT fk_community_created_by_1 FOREIGN KEY (created_by_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_community_invite_community_1; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY community_invites - ADD CONSTRAINT fk_community_invite_community_1 FOREIGN KEY (community_id) REFERENCES communities(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.community_invites + ADD CONSTRAINT fk_community_invite_community_1 FOREIGN KEY (community_id) REFERENCES public.communities(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_community_invite_invited_by_3; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY community_invites - ADD CONSTRAINT fk_community_invite_invited_by_3 FOREIGN KEY (invited_by_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.community_invites + ADD CONSTRAINT fk_community_invite_invited_by_3 FOREIGN KEY (invited_by_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_community_invite_used_by_2; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY community_invites - ADD CONSTRAINT fk_community_invite_used_by_2 FOREIGN KEY (used_by_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.community_invites + ADD CONSTRAINT fk_community_invite_used_by_2 FOREIGN KEY (used_by_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_contributor_post_1; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY contributions - ADD CONSTRAINT fk_contributor_post_1 FOREIGN KEY (post_id) REFERENCES posts(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.contributions + ADD CONSTRAINT fk_contributor_post_1 FOREIGN KEY (post_id) REFERENCES public.posts(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_contributor_user_2; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY contributions - ADD CONSTRAINT fk_contributor_user_2 FOREIGN KEY (user_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.contributions + ADD CONSTRAINT fk_contributor_user_2 FOREIGN KEY (user_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_follower_addedby_3; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY follows - ADD CONSTRAINT fk_follower_addedby_3 FOREIGN KEY (added_by_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.follows + ADD CONSTRAINT fk_follower_addedby_3 FOREIGN KEY (added_by_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_follower_post_1; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY follows - ADD CONSTRAINT fk_follower_post_1 FOREIGN KEY (post_id) REFERENCES posts(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.follows + ADD CONSTRAINT fk_follower_post_1 FOREIGN KEY (post_id) REFERENCES public.posts(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_follower_user_2; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY follows - ADD CONSTRAINT fk_follower_user_2 FOREIGN KEY (user_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.follows + ADD CONSTRAINT fk_follower_user_2 FOREIGN KEY (user_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_linked_account_user_4; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY linked_account - ADD CONSTRAINT fk_linked_account_user_4 FOREIGN KEY (user_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.linked_account + ADD CONSTRAINT fk_linked_account_user_4 FOREIGN KEY (user_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_media_post_1; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY media - ADD CONSTRAINT fk_media_post_1 FOREIGN KEY (post_id) REFERENCES posts(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.media + ADD CONSTRAINT fk_media_post_1 FOREIGN KEY (post_id) REFERENCES public.posts(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_post_community_community_02; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities_posts - ADD CONSTRAINT fk_post_community_community_02 FOREIGN KEY (community_id) REFERENCES communities(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.communities_posts + ADD CONSTRAINT fk_post_community_community_02 FOREIGN KEY (community_id) REFERENCES public.communities(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_post_community_post_01; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities_posts - ADD CONSTRAINT fk_post_community_post_01 FOREIGN KEY (post_id) REFERENCES posts(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.communities_posts + ADD CONSTRAINT fk_post_community_post_01 FOREIGN KEY (post_id) REFERENCES public.posts(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_post_creator_11; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY posts - ADD CONSTRAINT fk_post_creator_11 FOREIGN KEY (user_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.posts + ADD CONSTRAINT fk_post_creator_11 FOREIGN KEY (user_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_post_deactivated_by_01; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY posts - ADD CONSTRAINT fk_post_deactivated_by_01 FOREIGN KEY (deactivated_by_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.posts + ADD CONSTRAINT fk_post_deactivated_by_01 FOREIGN KEY (deactivated_by_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_thank_you_comment_1; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY thanks - ADD CONSTRAINT fk_thank_you_comment_1 FOREIGN KEY (comment_id) REFERENCES comments(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.thanks + ADD CONSTRAINT fk_thank_you_comment_1 FOREIGN KEY (comment_id) REFERENCES public.comments(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_thank_you_thanked_by_3; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY thanks - ADD CONSTRAINT fk_thank_you_thanked_by_3 FOREIGN KEY (thanked_by_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.thanks + ADD CONSTRAINT fk_thank_you_thanked_by_3 FOREIGN KEY (thanked_by_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_thank_you_user_2; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY thanks - ADD CONSTRAINT fk_thank_you_user_2 FOREIGN KEY (user_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.thanks + ADD CONSTRAINT fk_thank_you_user_2 FOREIGN KEY (user_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_upr_post_1; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY user_post_relevance - ADD CONSTRAINT fk_upr_post_1 FOREIGN KEY (post_id) REFERENCES posts(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.user_post_relevance + ADD CONSTRAINT fk_upr_post_1 FOREIGN KEY (post_id) REFERENCES public.posts(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_upr_user_1; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY user_post_relevance - ADD CONSTRAINT fk_upr_user_1 FOREIGN KEY (user_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.user_post_relevance + ADD CONSTRAINT fk_upr_user_1 FOREIGN KEY (user_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_users_community_community_02; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities_users - ADD CONSTRAINT fk_users_community_community_02 FOREIGN KEY (community_id) REFERENCES communities(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.communities_users + ADD CONSTRAINT fk_users_community_community_02 FOREIGN KEY (community_id) REFERENCES public.communities(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_users_community_users_01; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities_users - ADD CONSTRAINT fk_users_community_users_01 FOREIGN KEY (user_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.communities_users + ADD CONSTRAINT fk_users_community_users_01 FOREIGN KEY (user_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_vote_post_14; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY votes - ADD CONSTRAINT fk_vote_post_14 FOREIGN KEY (post_id) REFERENCES posts(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.votes + ADD CONSTRAINT fk_vote_post_14 FOREIGN KEY (post_id) REFERENCES public.posts(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: fk_vote_user_13; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY votes - ADD CONSTRAINT fk_vote_user_13 FOREIGN KEY (user_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.votes + ADD CONSTRAINT fk_vote_user_13 FOREIGN KEY (user_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: flagged_items_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY flagged_items - ADD CONSTRAINT flagged_items_user_id_foreign FOREIGN KEY (user_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.flagged_items + ADD CONSTRAINT flagged_items_user_id_foreign FOREIGN KEY (user_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: followed_tags_community_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY tag_follows - ADD CONSTRAINT followed_tags_community_id_foreign FOREIGN KEY (community_id) REFERENCES communities(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.tag_follows + ADD CONSTRAINT followed_tags_community_id_foreign FOREIGN KEY (community_id) REFERENCES public.communities(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: followed_tags_tag_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY tag_follows - ADD CONSTRAINT followed_tags_tag_id_foreign FOREIGN KEY (tag_id) REFERENCES tags(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.tag_follows + ADD CONSTRAINT followed_tags_tag_id_foreign FOREIGN KEY (tag_id) REFERENCES public.tags(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: followed_tags_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY tag_follows - ADD CONSTRAINT followed_tags_user_id_foreign FOREIGN KEY (user_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.tag_follows + ADD CONSTRAINT followed_tags_user_id_foreign FOREIGN KEY (user_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: follows_comment_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY follows - ADD CONSTRAINT follows_comment_id_foreign FOREIGN KEY (comment_id) REFERENCES comments(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.follows + ADD CONSTRAINT follows_comment_id_foreign FOREIGN KEY (comment_id) REFERENCES public.comments(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: group_connections_child_group_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY group_connections - ADD CONSTRAINT group_connections_child_group_id_foreign FOREIGN KEY (child_group_id) REFERENCES groups(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.group_connections + ADD CONSTRAINT group_connections_child_group_id_foreign FOREIGN KEY (child_group_id) REFERENCES public.groups(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: group_connections_parent_group_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY group_connections - ADD CONSTRAINT group_connections_parent_group_id_foreign FOREIGN KEY (parent_group_id) REFERENCES groups(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.group_connections + ADD CONSTRAINT group_connections_parent_group_id_foreign FOREIGN KEY (parent_group_id) REFERENCES public.groups(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: group_memberships_group_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY group_memberships - ADD CONSTRAINT group_memberships_group_id_foreign FOREIGN KEY (group_id) REFERENCES groups(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.group_memberships + ADD CONSTRAINT group_memberships_group_id_foreign FOREIGN KEY (group_id) REFERENCES public.groups(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: group_memberships_project_role_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY group_memberships - ADD CONSTRAINT group_memberships_project_role_id_foreign FOREIGN KEY (project_role_id) REFERENCES project_roles(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.group_memberships + ADD CONSTRAINT group_memberships_project_role_id_foreign FOREIGN KEY (project_role_id) REFERENCES public.project_roles(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: group_memberships_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY group_memberships - ADD CONSTRAINT group_memberships_user_id_foreign FOREIGN KEY (user_id) REFERENCES users(id); +ALTER TABLE ONLY public.group_memberships + ADD CONSTRAINT group_memberships_user_id_foreign FOREIGN KEY (user_id) REFERENCES public.users(id); -- -- Name: join_requests_community_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY join_requests - ADD CONSTRAINT join_requests_community_id_foreign FOREIGN KEY (community_id) REFERENCES communities(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.join_requests + ADD CONSTRAINT join_requests_community_id_foreign FOREIGN KEY (community_id) REFERENCES public.communities(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: join_requests_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY join_requests - ADD CONSTRAINT join_requests_user_id_foreign FOREIGN KEY (user_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.join_requests + ADD CONSTRAINT join_requests_user_id_foreign FOREIGN KEY (user_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: media_comment_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY media - ADD CONSTRAINT media_comment_id_foreign FOREIGN KEY (comment_id) REFERENCES comments(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.media + ADD CONSTRAINT media_comment_id_foreign FOREIGN KEY (comment_id) REFERENCES public.comments(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: networks_posts_network_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY networks_posts - ADD CONSTRAINT networks_posts_network_id_foreign FOREIGN KEY (network_id) REFERENCES networks(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.networks_posts + ADD CONSTRAINT networks_posts_network_id_foreign FOREIGN KEY (network_id) REFERENCES public.networks(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: networks_posts_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY networks_posts - ADD CONSTRAINT networks_posts_post_id_foreign FOREIGN KEY (post_id) REFERENCES posts(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.networks_posts + ADD CONSTRAINT networks_posts_post_id_foreign FOREIGN KEY (post_id) REFERENCES public.posts(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: networks_users_network_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY networks_users - ADD CONSTRAINT networks_users_network_id_foreign FOREIGN KEY (network_id) REFERENCES networks(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.networks_users + ADD CONSTRAINT networks_users_network_id_foreign FOREIGN KEY (network_id) REFERENCES public.networks(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: networks_users_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY networks_users - ADD CONSTRAINT networks_users_user_id_foreign FOREIGN KEY (user_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.networks_users + ADD CONSTRAINT networks_users_user_id_foreign FOREIGN KEY (user_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: nexudus_accounts_community_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY nexudus_accounts - ADD CONSTRAINT nexudus_accounts_community_id_foreign FOREIGN KEY (community_id) REFERENCES communities(id); +ALTER TABLE ONLY public.nexudus_accounts + ADD CONSTRAINT nexudus_accounts_community_id_foreign FOREIGN KEY (community_id) REFERENCES public.communities(id); -- -- Name: notifications_activity_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY notifications - ADD CONSTRAINT notifications_activity_id_foreign FOREIGN KEY (activity_id) REFERENCES activities(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.notifications + ADD CONSTRAINT notifications_activity_id_foreign FOREIGN KEY (activity_id) REFERENCES public.activities(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: notifications_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY notifications - ADD CONSTRAINT notifications_user_id_foreign FOREIGN KEY (user_id) REFERENCES users(id); +ALTER TABLE ONLY public.notifications + ADD CONSTRAINT notifications_user_id_foreign FOREIGN KEY (user_id) REFERENCES public.users(id); -- -- Name: post_link_preview_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY posts - ADD CONSTRAINT post_link_preview_id_foreign FOREIGN KEY (link_preview_id) REFERENCES link_previews(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.posts + ADD CONSTRAINT post_link_preview_id_foreign FOREIGN KEY (link_preview_id) REFERENCES public.link_previews(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: post_parent_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY posts - ADD CONSTRAINT post_parent_post_id_foreign FOREIGN KEY (parent_post_id) REFERENCES posts(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.posts + ADD CONSTRAINT post_parent_post_id_foreign FOREIGN KEY (parent_post_id) REFERENCES public.posts(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: posts_about_users_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY posts_about_users - ADD CONSTRAINT posts_about_users_post_id_foreign FOREIGN KEY (post_id) REFERENCES posts(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.posts_about_users + ADD CONSTRAINT posts_about_users_post_id_foreign FOREIGN KEY (post_id) REFERENCES public.posts(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: posts_about_users_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY posts_about_users - ADD CONSTRAINT posts_about_users_user_id_foreign FOREIGN KEY (user_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.posts_about_users + ADD CONSTRAINT posts_about_users_user_id_foreign FOREIGN KEY (user_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: posts_tags_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY posts_tags - ADD CONSTRAINT posts_tags_post_id_foreign FOREIGN KEY (post_id) REFERENCES posts(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.posts_tags + ADD CONSTRAINT posts_tags_post_id_foreign FOREIGN KEY (post_id) REFERENCES public.posts(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: posts_tags_tag_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY posts_tags - ADD CONSTRAINT posts_tags_tag_id_foreign FOREIGN KEY (tag_id) REFERENCES tags(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.posts_tags + ADD CONSTRAINT posts_tags_tag_id_foreign FOREIGN KEY (tag_id) REFERENCES public.tags(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: posts_users_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY posts_users - ADD CONSTRAINT posts_users_post_id_foreign FOREIGN KEY (post_id) REFERENCES posts(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.posts_users + ADD CONSTRAINT posts_users_post_id_foreign FOREIGN KEY (post_id) REFERENCES public.posts(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: posts_users_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY posts_users - ADD CONSTRAINT posts_users_user_id_foreign FOREIGN KEY (user_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.posts_users + ADD CONSTRAINT posts_users_user_id_foreign FOREIGN KEY (user_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: project_contributions_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.project_contributions + ADD CONSTRAINT project_contributions_post_id_foreign FOREIGN KEY (post_id) REFERENCES public.posts(id); + + +-- +-- Name: project_contributions_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.project_contributions + ADD CONSTRAINT project_contributions_user_id_foreign FOREIGN KEY (user_id) REFERENCES public.users(id); -- -- Name: project_roles_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY project_roles - ADD CONSTRAINT project_roles_post_id_foreign FOREIGN KEY (post_id) REFERENCES posts(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.project_roles + ADD CONSTRAINT project_roles_post_id_foreign FOREIGN KEY (post_id) REFERENCES public.posts(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: push_notifications_device_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY push_notifications - ADD CONSTRAINT push_notifications_device_id_foreign FOREIGN KEY (device_id) REFERENCES devices(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.push_notifications + ADD CONSTRAINT push_notifications_device_id_foreign FOREIGN KEY (device_id) REFERENCES public.devices(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: skills_users_skill_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY skills_users - ADD CONSTRAINT skills_users_skill_id_foreign FOREIGN KEY (skill_id) REFERENCES skills(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.skills_users + ADD CONSTRAINT skills_users_skill_id_foreign FOREIGN KEY (skill_id) REFERENCES public.skills(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: skills_users_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY skills_users - ADD CONSTRAINT skills_users_user_id_foreign FOREIGN KEY (user_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.skills_users + ADD CONSTRAINT skills_users_user_id_foreign FOREIGN KEY (user_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: user_connections_other_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY user_connections - ADD CONSTRAINT user_connections_other_user_id_foreign FOREIGN KEY (other_user_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.user_connections + ADD CONSTRAINT user_connections_other_user_id_foreign FOREIGN KEY (other_user_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: user_connections_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY user_connections - ADD CONSTRAINT user_connections_user_id_foreign FOREIGN KEY (user_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.user_connections + ADD CONSTRAINT user_connections_user_id_foreign FOREIGN KEY (user_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: user_external_data_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY user_external_data - ADD CONSTRAINT user_external_data_user_id_foreign FOREIGN KEY (user_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.user_external_data + ADD CONSTRAINT user_external_data_user_id_foreign FOREIGN KEY (user_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; -- -- Name: users_community_deactivator_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY communities_users - ADD CONSTRAINT users_community_deactivator_id_foreign FOREIGN KEY (deactivator_id) REFERENCES users(id) DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY public.communities_users + ADD CONSTRAINT users_community_deactivator_id_foreign FOREIGN KEY (deactivator_id) REFERENCES public.users(id) DEFERRABLE INITIALLY DEFERRED; + + +-- +-- Name: users_stripe_account_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.users + ADD CONSTRAINT users_stripe_account_id_foreign FOREIGN KEY (stripe_account_id) REFERENCES public.stripe_accounts(id); -- -- PostgreSQL database dump complete -- +-- \ No newline at end of file diff --git a/test/setup/index.js b/test/setup/index.js index 274c491b1..e3fad0f36 100644 --- a/test/setup/index.js +++ b/test/setup/index.js @@ -73,7 +73,8 @@ TestSetup.prototype.createSchema = function () { if (command.startsWith('CREATE TABLE')) { this.tables.push(command.split(' ')[2]) } - return bookshelf.knex.raw(command).transacting(trx) + // Adding back search path which schema dump turns off + return bookshelf.knex.raw(command + '; SET search_path = public, pg_catalog;').transacting(trx) }) }) // transaction } From f44682232b9536907e55da6a89d49ad33c8ea1a2 Mon Sep 17 00:00:00 2001 From: Loren Johnson Date: Wed, 13 Mar 2019 17:31:32 -0700 Subject: [PATCH 2/2] updates --- migrations/dump_schema.sh | 5 +- migrations/schema.sql | 404 ++++++++++++++++++++------------------ 2 files changed, 215 insertions(+), 194 deletions(-) diff --git a/migrations/dump_schema.sh b/migrations/dump_schema.sh index b6c4d1209..4258c83ff 100755 --- a/migrations/dump_schema.sh +++ b/migrations/dump_schema.sh @@ -1,2 +1,5 @@ #!/bin/bash -pg_dump -Osxn public hylo | sed -e 's/; Tablespace: $//' +# Working for Postgres 11 +pg_dump -Osx hylo | sed -e 's/; Tablespace: $//' +# Previously knowing working with Postgres 9.4 +# pg_dump -Osxn public hylo | sed -e 's/; Tablespace: $//' diff --git a/migrations/schema.sql b/migrations/schema.sql index af65af387..7081a3ff0 100644 --- a/migrations/schema.sql +++ b/migrations/schema.sql @@ -2,13 +2,32 @@ -- PostgreSQL database dump -- +-- Dumped from database version 11.2 +-- Dumped by pg_dump version 11.2 + 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 client_min_messages = warning; +SET row_security = off; + +-- +-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: - +-- + +CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; + + +-- +-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: - +-- + +COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; + SET default_tablespace = ''; @@ -1635,231 +1654,231 @@ CREATE TABLE public.votes ( -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: activities id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activities ALTER COLUMN id SET DEFAULT nextval('public.activity_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: blocked_users id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.blocked_users ALTER COLUMN id SET DEFAULT nextval('public.blocked_users_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: comments_tags id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.comments_tags ALTER COLUMN id SET DEFAULT nextval('public.comments_tags_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: communities_posts id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities_posts ALTER COLUMN id SET DEFAULT nextval('public.post_community_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: communities_tags id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities_tags ALTER COLUMN id SET DEFAULT nextval('public.communities_tags_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: communities_users id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities_users ALTER COLUMN id SET DEFAULT nextval('public.users_community_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: devices id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.devices ALTER COLUMN id SET DEFAULT nextval('public.devices_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: event_responses id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.event_responses ALTER COLUMN id SET DEFAULT nextval('public.event_responses_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: flagged_items id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.flagged_items ALTER COLUMN id SET DEFAULT nextval('public.flagged_items_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: group_connections id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.group_connections ALTER COLUMN id SET DEFAULT nextval('public.group_connections_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: group_memberships id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.group_memberships ALTER COLUMN id SET DEFAULT nextval('public.group_memberships_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: groups id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.groups ALTER COLUMN id SET DEFAULT nextval('public.groups_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: join_requests id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.join_requests ALTER COLUMN id SET DEFAULT nextval('public.join_requests_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: knex_migrations id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.knex_migrations ALTER COLUMN id SET DEFAULT nextval('public.knex_migrations_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: link_previews id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.link_previews ALTER COLUMN id SET DEFAULT nextval('public.link_previews_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: networks id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.networks ALTER COLUMN id SET DEFAULT nextval('public.networks_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: networks_posts id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.networks_posts ALTER COLUMN id SET DEFAULT nextval('public.networks_posts_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: networks_users id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.networks_users ALTER COLUMN id SET DEFAULT nextval('public.networks_users_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: nexudus_accounts id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.nexudus_accounts ALTER COLUMN id SET DEFAULT nextval('public.nexudus_accounts_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: notifications id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.notifications ALTER COLUMN id SET DEFAULT nextval('public.notifications_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: posts_tags id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.posts_tags ALTER COLUMN id SET DEFAULT nextval('public.posts_tags_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: posts_users id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.posts_users ALTER COLUMN id SET DEFAULT nextval('public.posts_users_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: project_contributions id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.project_contributions ALTER COLUMN id SET DEFAULT nextval('public.project_contributions_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: project_roles id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.project_roles ALTER COLUMN id SET DEFAULT nextval('public.project_roles_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: push_notifications id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.push_notifications ALTER COLUMN id SET DEFAULT nextval('public.queued_pushes_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: skills id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.skills ALTER COLUMN id SET DEFAULT nextval('public.skills_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: skills_users id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.skills_users ALTER COLUMN id SET DEFAULT nextval('public.skills_users_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: stripe_accounts id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.stripe_accounts ALTER COLUMN id SET DEFAULT nextval('public.stripe_accounts_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: tag_follows id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.tag_follows ALTER COLUMN id SET DEFAULT nextval('public.followed_tags_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: tags id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.tags ALTER COLUMN id SET DEFAULT nextval('public.tags_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: user_connections id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.user_connections ALTER COLUMN id SET DEFAULT nextval('public.user_connections_id_seq'::regclass); -- --- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- Name: user_external_data id; Type: DEFAULT; Schema: public; Owner: - -- ALTER TABLE ONLY public.user_external_data ALTER COLUMN id SET DEFAULT nextval('public.user_external_data_id_seq'::regclass); -- --- Name: pk_users; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: users pk_users; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.users @@ -1900,7 +1919,7 @@ UNION -- --- Name: activity_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: activities activity_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activities @@ -1908,7 +1927,7 @@ ALTER TABLE ONLY public.activities -- --- Name: blocked_users_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: blocked_users blocked_users_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.blocked_users @@ -1916,7 +1935,7 @@ ALTER TABLE ONLY public.blocked_users -- --- Name: comments_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: comments_tags comments_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.comments_tags @@ -1924,7 +1943,7 @@ ALTER TABLE ONLY public.comments_tags -- --- Name: communities_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: communities_tags communities_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities_tags @@ -1932,7 +1951,7 @@ ALTER TABLE ONLY public.communities_tags -- --- Name: devices_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: devices devices_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.devices @@ -1940,7 +1959,7 @@ ALTER TABLE ONLY public.devices -- --- Name: event_responses_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: event_responses event_responses_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.event_responses @@ -1948,7 +1967,7 @@ ALTER TABLE ONLY public.event_responses -- --- Name: event_responses_user_id_post_id_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: event_responses event_responses_user_id_post_id_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.event_responses @@ -1956,7 +1975,7 @@ ALTER TABLE ONLY public.event_responses -- --- Name: flagged_items_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: flagged_items flagged_items_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.flagged_items @@ -1964,7 +1983,7 @@ ALTER TABLE ONLY public.flagged_items -- --- Name: followed_tags_community_id_tag_id_user_id_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: tag_follows followed_tags_community_id_tag_id_user_id_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.tag_follows @@ -1972,7 +1991,7 @@ ALTER TABLE ONLY public.tag_follows -- --- Name: followed_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: tag_follows followed_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.tag_follows @@ -1980,7 +1999,7 @@ ALTER TABLE ONLY public.tag_follows -- --- Name: group_connections_parent_group_id_child_group_id_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: group_connections group_connections_parent_group_id_child_group_id_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.group_connections @@ -1988,7 +2007,7 @@ ALTER TABLE ONLY public.group_connections -- --- Name: group_connections_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: group_connections group_connections_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.group_connections @@ -1996,7 +2015,7 @@ ALTER TABLE ONLY public.group_connections -- --- Name: group_memberships_group_id_user_id_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: group_memberships group_memberships_group_id_user_id_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.group_memberships @@ -2004,7 +2023,7 @@ ALTER TABLE ONLY public.group_memberships -- --- Name: group_memberships_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: group_memberships group_memberships_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.group_memberships @@ -2012,7 +2031,7 @@ ALTER TABLE ONLY public.group_memberships -- --- Name: groups_group_data_id_group_data_type_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: groups groups_group_data_id_group_data_type_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.groups @@ -2020,7 +2039,7 @@ ALTER TABLE ONLY public.groups -- --- Name: groups_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: groups groups_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.groups @@ -2028,7 +2047,7 @@ ALTER TABLE ONLY public.groups -- --- Name: join_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: join_requests join_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.join_requests @@ -2036,7 +2055,7 @@ ALTER TABLE ONLY public.join_requests -- --- Name: knex_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: knex_migrations knex_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.knex_migrations @@ -2044,7 +2063,7 @@ ALTER TABLE ONLY public.knex_migrations -- --- Name: link_previews_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: link_previews link_previews_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.link_previews @@ -2052,7 +2071,7 @@ ALTER TABLE ONLY public.link_previews -- --- Name: link_previews_url_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: link_previews link_previews_url_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.link_previews @@ -2060,7 +2079,7 @@ ALTER TABLE ONLY public.link_previews -- --- Name: network_id_post_id_key; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: networks_posts network_id_post_id_key; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.networks_posts @@ -2068,7 +2087,7 @@ ALTER TABLE ONLY public.networks_posts -- --- Name: networks_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: networks networks_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.networks @@ -2076,7 +2095,7 @@ ALTER TABLE ONLY public.networks -- --- Name: networks_posts_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: networks_posts networks_posts_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.networks_posts @@ -2084,7 +2103,7 @@ ALTER TABLE ONLY public.networks_posts -- --- Name: networks_slug_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: networks networks_slug_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.networks @@ -2092,7 +2111,7 @@ ALTER TABLE ONLY public.networks -- --- Name: networks_users_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: networks_users networks_users_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.networks_users @@ -2100,7 +2119,7 @@ ALTER TABLE ONLY public.networks_users -- --- Name: nexudus_accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: nexudus_accounts nexudus_accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.nexudus_accounts @@ -2108,7 +2127,7 @@ ALTER TABLE ONLY public.nexudus_accounts -- --- Name: notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: notifications notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.notifications @@ -2116,7 +2135,7 @@ ALTER TABLE ONLY public.notifications -- --- Name: pk_comment; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: comments pk_comment; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.comments @@ -2124,7 +2143,7 @@ ALTER TABLE ONLY public.comments -- --- Name: pk_community; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: communities pk_community; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities @@ -2132,7 +2151,7 @@ ALTER TABLE ONLY public.communities -- --- Name: pk_community_invite; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: community_invites pk_community_invite; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.community_invites @@ -2140,7 +2159,7 @@ ALTER TABLE ONLY public.community_invites -- --- Name: pk_contributor; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: contributions pk_contributor; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.contributions @@ -2148,7 +2167,7 @@ ALTER TABLE ONLY public.contributions -- --- Name: pk_follower; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: follows pk_follower; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.follows @@ -2156,7 +2175,7 @@ ALTER TABLE ONLY public.follows -- --- Name: pk_linked_account; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: linked_account pk_linked_account; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.linked_account @@ -2164,7 +2183,7 @@ ALTER TABLE ONLY public.linked_account -- --- Name: pk_media; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: media pk_media; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.media @@ -2172,7 +2191,7 @@ ALTER TABLE ONLY public.media -- --- Name: pk_post; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: posts pk_post; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.posts @@ -2180,7 +2199,7 @@ ALTER TABLE ONLY public.posts -- --- Name: pk_thank_you; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: thanks pk_thank_you; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.thanks @@ -2188,7 +2207,7 @@ ALTER TABLE ONLY public.thanks -- --- Name: pk_user_post_relevance; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: user_post_relevance pk_user_post_relevance; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.user_post_relevance @@ -2196,7 +2215,7 @@ ALTER TABLE ONLY public.user_post_relevance -- --- Name: pk_vote; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: votes pk_vote; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.votes @@ -2204,7 +2223,7 @@ ALTER TABLE ONLY public.votes -- --- Name: post_community_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: communities_posts post_community_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities_posts @@ -2212,7 +2231,7 @@ ALTER TABLE ONLY public.communities_posts -- --- Name: post_community_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: communities_posts post_community_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities_posts @@ -2220,7 +2239,7 @@ ALTER TABLE ONLY public.communities_posts -- --- Name: posts_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: posts_tags posts_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.posts_tags @@ -2228,7 +2247,7 @@ ALTER TABLE ONLY public.posts_tags -- --- Name: posts_users_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: posts_users posts_users_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.posts_users @@ -2236,7 +2255,7 @@ ALTER TABLE ONLY public.posts_users -- --- Name: project_contributions_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: project_contributions project_contributions_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.project_contributions @@ -2244,7 +2263,7 @@ ALTER TABLE ONLY public.project_contributions -- --- Name: project_roles_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: project_roles project_roles_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.project_roles @@ -2252,7 +2271,7 @@ ALTER TABLE ONLY public.project_roles -- --- Name: queued_pushes_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: push_notifications queued_pushes_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.push_notifications @@ -2260,7 +2279,7 @@ ALTER TABLE ONLY public.push_notifications -- --- Name: skills_name_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: skills skills_name_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.skills @@ -2268,7 +2287,7 @@ ALTER TABLE ONLY public.skills -- --- Name: skills_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: skills skills_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.skills @@ -2276,7 +2295,7 @@ ALTER TABLE ONLY public.skills -- --- Name: skills_users_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: skills_users skills_users_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.skills_users @@ -2284,7 +2303,7 @@ ALTER TABLE ONLY public.skills_users -- --- Name: skills_users_skill_id_user_id_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: skills_users skills_users_skill_id_user_id_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.skills_users @@ -2292,7 +2311,7 @@ ALTER TABLE ONLY public.skills_users -- --- Name: stripe_accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: stripe_accounts stripe_accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.stripe_accounts @@ -2300,7 +2319,7 @@ ALTER TABLE ONLY public.stripe_accounts -- --- Name: tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: tags tags_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.tags @@ -2308,7 +2327,7 @@ ALTER TABLE ONLY public.tags -- --- Name: unique_beta_access_code; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: communities unique_beta_access_code; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities @@ -2316,7 +2335,7 @@ ALTER TABLE ONLY public.communities -- --- Name: unique_comments_tags; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: comments_tags unique_comments_tags; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.comments_tags @@ -2324,7 +2343,7 @@ ALTER TABLE ONLY public.comments_tags -- --- Name: unique_communities_tags; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: communities_tags unique_communities_tags; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities_tags @@ -2332,7 +2351,7 @@ ALTER TABLE ONLY public.communities_tags -- --- Name: unique_email; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: users unique_email; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.users @@ -2340,7 +2359,7 @@ ALTER TABLE ONLY public.users -- --- Name: unique_follows; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: follows unique_follows; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.follows @@ -2348,7 +2367,7 @@ ALTER TABLE ONLY public.follows -- --- Name: unique_join_requests; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: join_requests unique_join_requests; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.join_requests @@ -2356,7 +2375,7 @@ ALTER TABLE ONLY public.join_requests -- --- Name: unique_name; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: tags unique_name; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.tags @@ -2364,7 +2383,7 @@ ALTER TABLE ONLY public.tags -- --- Name: unique_posts_tags; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: posts_tags unique_posts_tags; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.posts_tags @@ -2372,7 +2391,7 @@ ALTER TABLE ONLY public.posts_tags -- --- Name: uq_community_1; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: communities uq_community_1; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities @@ -2380,7 +2399,7 @@ ALTER TABLE ONLY public.communities -- --- Name: uq_community_2; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: communities uq_community_2; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities @@ -2388,7 +2407,7 @@ ALTER TABLE ONLY public.communities -- --- Name: uq_no_multiple_contributor_2; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: contributions uq_no_multiple_contributor_2; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.contributions @@ -2396,7 +2415,7 @@ ALTER TABLE ONLY public.contributions -- --- Name: uq_no_multiple_thankyous_2; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: thanks uq_no_multiple_thankyous_2; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.thanks @@ -2404,7 +2423,7 @@ ALTER TABLE ONLY public.thanks -- --- Name: uq_no_multiple_tokens; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: community_invites uq_no_multiple_tokens; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.community_invites @@ -2412,7 +2431,7 @@ ALTER TABLE ONLY public.community_invites -- --- Name: uq_vote_1; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: votes uq_vote_1; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.votes @@ -2420,7 +2439,7 @@ ALTER TABLE ONLY public.votes -- --- Name: user_community_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: communities_users user_community_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities_users @@ -2428,7 +2447,7 @@ ALTER TABLE ONLY public.communities_users -- --- Name: user_connections_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: user_connections user_connections_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.user_connections @@ -2436,7 +2455,7 @@ ALTER TABLE ONLY public.user_connections -- --- Name: user_external_data_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: user_external_data user_external_data_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.user_external_data @@ -2444,7 +2463,7 @@ ALTER TABLE ONLY public.user_external_data -- --- Name: user_id_post_id_unique; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: user_post_relevance user_id_post_id_unique; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.user_post_relevance @@ -2452,7 +2471,7 @@ ALTER TABLE ONLY public.user_post_relevance -- --- Name: users_community_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- Name: communities_users users_community_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities_users @@ -2607,7 +2626,7 @@ CREATE INDEX notifications_pk_medium_0 ON public.notifications USING btree (id) -- --- Name: activities_contribution_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: activities activities_contribution_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activities @@ -2615,7 +2634,7 @@ ALTER TABLE ONLY public.activities -- --- Name: activities_parent_comment_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: activities activities_parent_comment_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activities @@ -2623,7 +2642,7 @@ ALTER TABLE ONLY public.activities -- --- Name: activities_project_contribution_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: activities activities_project_contribution_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activities @@ -2631,7 +2650,7 @@ ALTER TABLE ONLY public.activities -- --- Name: activity_actor_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: activities activity_actor_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activities @@ -2639,7 +2658,7 @@ ALTER TABLE ONLY public.activities -- --- Name: activity_comment_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: activities activity_comment_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activities @@ -2647,7 +2666,7 @@ ALTER TABLE ONLY public.activities -- --- Name: activity_community_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: activities activity_community_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activities @@ -2655,7 +2674,7 @@ ALTER TABLE ONLY public.activities -- --- Name: activity_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: activities activity_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activities @@ -2663,7 +2682,7 @@ ALTER TABLE ONLY public.activities -- --- Name: activity_reader_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: activities activity_reader_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.activities @@ -2671,7 +2690,7 @@ ALTER TABLE ONLY public.activities -- --- Name: blocked_users_blocked_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: blocked_users blocked_users_blocked_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.blocked_users @@ -2679,7 +2698,7 @@ ALTER TABLE ONLY public.blocked_users -- --- Name: blocked_users_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: blocked_users blocked_users_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.blocked_users @@ -2687,7 +2706,7 @@ ALTER TABLE ONLY public.blocked_users -- --- Name: comments_comment_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: comments comments_comment_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.comments @@ -2695,7 +2714,7 @@ ALTER TABLE ONLY public.comments -- --- Name: comments_tags_comment_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: comments_tags comments_tags_comment_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.comments_tags @@ -2703,7 +2722,7 @@ ALTER TABLE ONLY public.comments_tags -- --- Name: comments_tags_tag_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: comments_tags comments_tags_tag_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.comments_tags @@ -2711,7 +2730,7 @@ ALTER TABLE ONLY public.comments_tags -- --- Name: communities_tags_community_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: communities_tags communities_tags_community_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities_tags @@ -2719,7 +2738,7 @@ ALTER TABLE ONLY public.communities_tags -- --- Name: communities_tags_owner_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: communities_tags communities_tags_owner_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities_tags @@ -2727,7 +2746,7 @@ ALTER TABLE ONLY public.communities_tags -- --- Name: communities_tags_tag_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: communities_tags communities_tags_tag_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities_tags @@ -2735,7 +2754,7 @@ ALTER TABLE ONLY public.communities_tags -- --- Name: community_invite_tag_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: community_invites community_invite_tag_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.community_invites @@ -2743,7 +2762,7 @@ ALTER TABLE ONLY public.community_invites -- --- Name: community_invites_expired_by_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: community_invites community_invites_expired_by_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.community_invites @@ -2751,7 +2770,7 @@ ALTER TABLE ONLY public.community_invites -- --- Name: community_leader_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: communities community_leader_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities @@ -2759,7 +2778,7 @@ ALTER TABLE ONLY public.communities -- --- Name: community_network_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: communities community_network_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities @@ -2767,7 +2786,7 @@ ALTER TABLE ONLY public.communities -- --- Name: devices_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: devices devices_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.devices @@ -2775,7 +2794,7 @@ ALTER TABLE ONLY public.devices -- --- Name: event_responses_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: event_responses event_responses_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.event_responses @@ -2783,7 +2802,7 @@ ALTER TABLE ONLY public.event_responses -- --- Name: event_responses_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: event_responses event_responses_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.event_responses @@ -2791,7 +2810,7 @@ ALTER TABLE ONLY public.event_responses -- --- Name: fk_comment_deactivated_by_01; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: comments fk_comment_deactivated_by_01; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.comments @@ -2799,7 +2818,7 @@ ALTER TABLE ONLY public.comments -- --- Name: fk_comment_post_2; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: comments fk_comment_post_2; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.comments @@ -2807,7 +2826,7 @@ ALTER TABLE ONLY public.comments -- --- Name: fk_comment_user_1; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: comments fk_comment_user_1; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.comments @@ -2815,7 +2834,7 @@ ALTER TABLE ONLY public.comments -- --- Name: fk_community_created_by_1; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: communities fk_community_created_by_1; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities @@ -2823,7 +2842,7 @@ ALTER TABLE ONLY public.communities -- --- Name: fk_community_invite_community_1; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: community_invites fk_community_invite_community_1; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.community_invites @@ -2831,7 +2850,7 @@ ALTER TABLE ONLY public.community_invites -- --- Name: fk_community_invite_invited_by_3; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: community_invites fk_community_invite_invited_by_3; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.community_invites @@ -2839,7 +2858,7 @@ ALTER TABLE ONLY public.community_invites -- --- Name: fk_community_invite_used_by_2; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: community_invites fk_community_invite_used_by_2; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.community_invites @@ -2847,7 +2866,7 @@ ALTER TABLE ONLY public.community_invites -- --- Name: fk_contributor_post_1; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: contributions fk_contributor_post_1; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.contributions @@ -2855,7 +2874,7 @@ ALTER TABLE ONLY public.contributions -- --- Name: fk_contributor_user_2; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: contributions fk_contributor_user_2; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.contributions @@ -2863,7 +2882,7 @@ ALTER TABLE ONLY public.contributions -- --- Name: fk_follower_addedby_3; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: follows fk_follower_addedby_3; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.follows @@ -2871,7 +2890,7 @@ ALTER TABLE ONLY public.follows -- --- Name: fk_follower_post_1; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: follows fk_follower_post_1; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.follows @@ -2879,7 +2898,7 @@ ALTER TABLE ONLY public.follows -- --- Name: fk_follower_user_2; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: follows fk_follower_user_2; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.follows @@ -2887,7 +2906,7 @@ ALTER TABLE ONLY public.follows -- --- Name: fk_linked_account_user_4; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: linked_account fk_linked_account_user_4; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.linked_account @@ -2895,7 +2914,7 @@ ALTER TABLE ONLY public.linked_account -- --- Name: fk_media_post_1; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: media fk_media_post_1; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.media @@ -2903,7 +2922,7 @@ ALTER TABLE ONLY public.media -- --- Name: fk_post_community_community_02; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: communities_posts fk_post_community_community_02; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities_posts @@ -2911,7 +2930,7 @@ ALTER TABLE ONLY public.communities_posts -- --- Name: fk_post_community_post_01; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: communities_posts fk_post_community_post_01; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities_posts @@ -2919,7 +2938,7 @@ ALTER TABLE ONLY public.communities_posts -- --- Name: fk_post_creator_11; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: posts fk_post_creator_11; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.posts @@ -2927,7 +2946,7 @@ ALTER TABLE ONLY public.posts -- --- Name: fk_post_deactivated_by_01; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: posts fk_post_deactivated_by_01; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.posts @@ -2935,7 +2954,7 @@ ALTER TABLE ONLY public.posts -- --- Name: fk_thank_you_comment_1; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: thanks fk_thank_you_comment_1; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.thanks @@ -2943,7 +2962,7 @@ ALTER TABLE ONLY public.thanks -- --- Name: fk_thank_you_thanked_by_3; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: thanks fk_thank_you_thanked_by_3; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.thanks @@ -2951,7 +2970,7 @@ ALTER TABLE ONLY public.thanks -- --- Name: fk_thank_you_user_2; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: thanks fk_thank_you_user_2; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.thanks @@ -2959,7 +2978,7 @@ ALTER TABLE ONLY public.thanks -- --- Name: fk_upr_post_1; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: user_post_relevance fk_upr_post_1; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.user_post_relevance @@ -2967,7 +2986,7 @@ ALTER TABLE ONLY public.user_post_relevance -- --- Name: fk_upr_user_1; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: user_post_relevance fk_upr_user_1; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.user_post_relevance @@ -2975,7 +2994,7 @@ ALTER TABLE ONLY public.user_post_relevance -- --- Name: fk_users_community_community_02; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: communities_users fk_users_community_community_02; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities_users @@ -2983,7 +3002,7 @@ ALTER TABLE ONLY public.communities_users -- --- Name: fk_users_community_users_01; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: communities_users fk_users_community_users_01; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities_users @@ -2991,7 +3010,7 @@ ALTER TABLE ONLY public.communities_users -- --- Name: fk_vote_post_14; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: votes fk_vote_post_14; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.votes @@ -2999,7 +3018,7 @@ ALTER TABLE ONLY public.votes -- --- Name: fk_vote_user_13; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: votes fk_vote_user_13; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.votes @@ -3007,7 +3026,7 @@ ALTER TABLE ONLY public.votes -- --- Name: flagged_items_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: flagged_items flagged_items_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.flagged_items @@ -3015,7 +3034,7 @@ ALTER TABLE ONLY public.flagged_items -- --- Name: followed_tags_community_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: tag_follows followed_tags_community_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.tag_follows @@ -3023,7 +3042,7 @@ ALTER TABLE ONLY public.tag_follows -- --- Name: followed_tags_tag_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: tag_follows followed_tags_tag_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.tag_follows @@ -3031,7 +3050,7 @@ ALTER TABLE ONLY public.tag_follows -- --- Name: followed_tags_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: tag_follows followed_tags_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.tag_follows @@ -3039,7 +3058,7 @@ ALTER TABLE ONLY public.tag_follows -- --- Name: follows_comment_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: follows follows_comment_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.follows @@ -3047,7 +3066,7 @@ ALTER TABLE ONLY public.follows -- --- Name: group_connections_child_group_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: group_connections group_connections_child_group_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.group_connections @@ -3055,7 +3074,7 @@ ALTER TABLE ONLY public.group_connections -- --- Name: group_connections_parent_group_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: group_connections group_connections_parent_group_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.group_connections @@ -3063,7 +3082,7 @@ ALTER TABLE ONLY public.group_connections -- --- Name: group_memberships_group_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: group_memberships group_memberships_group_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.group_memberships @@ -3071,7 +3090,7 @@ ALTER TABLE ONLY public.group_memberships -- --- Name: group_memberships_project_role_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: group_memberships group_memberships_project_role_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.group_memberships @@ -3079,7 +3098,7 @@ ALTER TABLE ONLY public.group_memberships -- --- Name: group_memberships_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: group_memberships group_memberships_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.group_memberships @@ -3087,7 +3106,7 @@ ALTER TABLE ONLY public.group_memberships -- --- Name: join_requests_community_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: join_requests join_requests_community_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.join_requests @@ -3095,7 +3114,7 @@ ALTER TABLE ONLY public.join_requests -- --- Name: join_requests_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: join_requests join_requests_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.join_requests @@ -3103,7 +3122,7 @@ ALTER TABLE ONLY public.join_requests -- --- Name: media_comment_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: media media_comment_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.media @@ -3111,7 +3130,7 @@ ALTER TABLE ONLY public.media -- --- Name: networks_posts_network_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: networks_posts networks_posts_network_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.networks_posts @@ -3119,7 +3138,7 @@ ALTER TABLE ONLY public.networks_posts -- --- Name: networks_posts_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: networks_posts networks_posts_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.networks_posts @@ -3127,7 +3146,7 @@ ALTER TABLE ONLY public.networks_posts -- --- Name: networks_users_network_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: networks_users networks_users_network_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.networks_users @@ -3135,7 +3154,7 @@ ALTER TABLE ONLY public.networks_users -- --- Name: networks_users_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: networks_users networks_users_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.networks_users @@ -3143,7 +3162,7 @@ ALTER TABLE ONLY public.networks_users -- --- Name: nexudus_accounts_community_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: nexudus_accounts nexudus_accounts_community_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.nexudus_accounts @@ -3151,7 +3170,7 @@ ALTER TABLE ONLY public.nexudus_accounts -- --- Name: notifications_activity_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: notifications notifications_activity_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.notifications @@ -3159,7 +3178,7 @@ ALTER TABLE ONLY public.notifications -- --- Name: notifications_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: notifications notifications_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.notifications @@ -3167,7 +3186,7 @@ ALTER TABLE ONLY public.notifications -- --- Name: post_link_preview_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: posts post_link_preview_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.posts @@ -3175,7 +3194,7 @@ ALTER TABLE ONLY public.posts -- --- Name: post_parent_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: posts post_parent_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.posts @@ -3183,7 +3202,7 @@ ALTER TABLE ONLY public.posts -- --- Name: posts_about_users_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: posts_about_users posts_about_users_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.posts_about_users @@ -3191,7 +3210,7 @@ ALTER TABLE ONLY public.posts_about_users -- --- Name: posts_about_users_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: posts_about_users posts_about_users_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.posts_about_users @@ -3199,7 +3218,7 @@ ALTER TABLE ONLY public.posts_about_users -- --- Name: posts_tags_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: posts_tags posts_tags_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.posts_tags @@ -3207,7 +3226,7 @@ ALTER TABLE ONLY public.posts_tags -- --- Name: posts_tags_tag_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: posts_tags posts_tags_tag_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.posts_tags @@ -3215,7 +3234,7 @@ ALTER TABLE ONLY public.posts_tags -- --- Name: posts_users_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: posts_users posts_users_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.posts_users @@ -3223,7 +3242,7 @@ ALTER TABLE ONLY public.posts_users -- --- Name: posts_users_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: posts_users posts_users_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.posts_users @@ -3231,7 +3250,7 @@ ALTER TABLE ONLY public.posts_users -- --- Name: project_contributions_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: project_contributions project_contributions_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.project_contributions @@ -3239,7 +3258,7 @@ ALTER TABLE ONLY public.project_contributions -- --- Name: project_contributions_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: project_contributions project_contributions_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.project_contributions @@ -3247,7 +3266,7 @@ ALTER TABLE ONLY public.project_contributions -- --- Name: project_roles_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: project_roles project_roles_post_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.project_roles @@ -3255,7 +3274,7 @@ ALTER TABLE ONLY public.project_roles -- --- Name: push_notifications_device_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: push_notifications push_notifications_device_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.push_notifications @@ -3263,7 +3282,7 @@ ALTER TABLE ONLY public.push_notifications -- --- Name: skills_users_skill_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: skills_users skills_users_skill_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.skills_users @@ -3271,7 +3290,7 @@ ALTER TABLE ONLY public.skills_users -- --- Name: skills_users_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: skills_users skills_users_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.skills_users @@ -3279,7 +3298,7 @@ ALTER TABLE ONLY public.skills_users -- --- Name: user_connections_other_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: user_connections user_connections_other_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.user_connections @@ -3287,7 +3306,7 @@ ALTER TABLE ONLY public.user_connections -- --- Name: user_connections_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: user_connections user_connections_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.user_connections @@ -3295,7 +3314,7 @@ ALTER TABLE ONLY public.user_connections -- --- Name: user_external_data_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: user_external_data user_external_data_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.user_external_data @@ -3303,7 +3322,7 @@ ALTER TABLE ONLY public.user_external_data -- --- Name: users_community_deactivator_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: communities_users users_community_deactivator_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.communities_users @@ -3311,7 +3330,7 @@ ALTER TABLE ONLY public.communities_users -- --- Name: users_stripe_account_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - +-- Name: users users_stripe_account_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: - -- ALTER TABLE ONLY public.users @@ -3322,4 +3341,3 @@ ALTER TABLE ONLY public.users -- PostgreSQL database dump complete -- --- \ No newline at end of file