diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4de578..9b98b63 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -130,6 +130,32 @@ jobs: - run: pnpm install --frozen-lockfile - run: pnpm build + schema-check: + name: Schema Drift Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4 + - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 + with: + node-version: 24 + cache: 'pnpm' + - name: Clone and build barazo-lexicons + run: | + git clone --depth 1 https://github.com/barazo-forum/barazo-lexicons.git ../barazo-lexicons + cd ../barazo-lexicons && pnpm install --ignore-scripts && pnpm run build + - run: pnpm install --frozen-lockfile + - name: Check for uncommitted schema changes + run: | + pnpm db:generate --name=ci-check + if [ -n "$(git status --porcelain drizzle/)" ]; then + echo "::error::Schema changes detected but no migration committed." + echo "Run 'pnpm db:generate' locally and commit the result." + git diff drizzle/ + exit 1 + fi + echo "Schema is in sync with migrations." + security: name: Security Scan runs-on: ubuntu-latest diff --git a/drizzle.config.ts b/drizzle.config.ts index 798e5df..ed8d9bd 100644 --- a/drizzle.config.ts +++ b/drizzle.config.ts @@ -34,6 +34,9 @@ export default defineConfig({ ], out: './drizzle', dialect: 'postgresql', + entities: { + roles: true, + }, dbCredentials: { url: process.env['DATABASE_URL'] ?? 'postgresql://barazo:barazo_dev@localhost:5432/barazo', }, diff --git a/drizzle/0000_baseline.sql b/drizzle/0000_baseline.sql new file mode 100644 index 0000000..e7a6e59 --- /dev/null +++ b/drizzle/0000_baseline.sql @@ -0,0 +1,498 @@ +CREATE ROLE "barazo_app";--> statement-breakpoint +CREATE TABLE "users" ( + "did" text PRIMARY KEY NOT NULL, + "handle" text NOT NULL, + "display_name" text, + "avatar_url" text, + "banner_url" text, + "bio" text, + "role" text DEFAULT 'user' NOT NULL, + "is_banned" boolean DEFAULT false NOT NULL, + "reputation_score" integer DEFAULT 0 NOT NULL, + "first_seen_at" timestamp with time zone DEFAULT now() NOT NULL, + "last_active_at" timestamp with time zone DEFAULT now() NOT NULL, + "declared_age" integer, + "maturity_pref" text DEFAULT 'safe' NOT NULL, + "account_created_at" timestamp with time zone, + "followers_count" integer DEFAULT 0 NOT NULL, + "follows_count" integer DEFAULT 0 NOT NULL, + "atproto_posts_count" integer DEFAULT 0 NOT NULL, + "has_bluesky_profile" boolean DEFAULT false NOT NULL, + "atproto_labels" jsonb DEFAULT '[]'::jsonb NOT NULL +); +--> statement-breakpoint +CREATE TABLE "firehose_cursor" ( + "id" text PRIMARY KEY DEFAULT 'default' NOT NULL, + "cursor" bigint, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE "topics" ( + "uri" text PRIMARY KEY NOT NULL, + "rkey" text NOT NULL, + "author_did" text NOT NULL, + "title" text NOT NULL, + "content" text NOT NULL, + "content_format" text, + "category" text NOT NULL, + "tags" jsonb, + "community_did" text NOT NULL, + "cid" text NOT NULL, + "labels" jsonb, + "reply_count" integer DEFAULT 0 NOT NULL, + "reaction_count" integer DEFAULT 0 NOT NULL, + "vote_count" integer DEFAULT 0 NOT NULL, + "last_activity_at" timestamp with time zone DEFAULT now() NOT NULL, + "created_at" timestamp with time zone NOT NULL, + "indexed_at" timestamp with time zone DEFAULT now() NOT NULL, + "is_locked" boolean DEFAULT false NOT NULL, + "is_pinned" boolean DEFAULT false NOT NULL, + "is_mod_deleted" boolean DEFAULT false NOT NULL, + "is_author_deleted" boolean DEFAULT false NOT NULL, + "moderation_status" text DEFAULT 'approved' NOT NULL, + "trust_status" text DEFAULT 'trusted' NOT NULL +); +--> statement-breakpoint +ALTER TABLE "topics" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "replies" ( + "uri" text PRIMARY KEY NOT NULL, + "rkey" text NOT NULL, + "author_did" text NOT NULL, + "content" text NOT NULL, + "content_format" text, + "root_uri" text NOT NULL, + "root_cid" text NOT NULL, + "parent_uri" text NOT NULL, + "parent_cid" text NOT NULL, + "community_did" text NOT NULL, + "cid" text NOT NULL, + "labels" jsonb, + "reaction_count" integer DEFAULT 0 NOT NULL, + "vote_count" integer DEFAULT 0 NOT NULL, + "created_at" timestamp with time zone NOT NULL, + "indexed_at" timestamp with time zone DEFAULT now() NOT NULL, + "is_author_deleted" boolean DEFAULT false NOT NULL, + "is_mod_deleted" boolean DEFAULT false NOT NULL, + "moderation_status" text DEFAULT 'approved' NOT NULL, + "trust_status" text DEFAULT 'trusted' NOT NULL +); +--> statement-breakpoint +ALTER TABLE "replies" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "reactions" ( + "uri" text PRIMARY KEY NOT NULL, + "rkey" text NOT NULL, + "author_did" text NOT NULL, + "subject_uri" text NOT NULL, + "subject_cid" text NOT NULL, + "type" text NOT NULL, + "community_did" text NOT NULL, + "cid" text NOT NULL, + "created_at" timestamp with time zone NOT NULL, + "indexed_at" timestamp with time zone DEFAULT now() NOT NULL, + CONSTRAINT "reactions_author_subject_type_uniq" UNIQUE("author_did","subject_uri","type") +); +--> statement-breakpoint +ALTER TABLE "reactions" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "votes" ( + "uri" text PRIMARY KEY NOT NULL, + "rkey" text NOT NULL, + "author_did" text NOT NULL, + "subject_uri" text NOT NULL, + "subject_cid" text NOT NULL, + "direction" text NOT NULL, + "community_did" text NOT NULL, + "cid" text NOT NULL, + "created_at" timestamp with time zone NOT NULL, + "indexed_at" timestamp with time zone DEFAULT now() NOT NULL, + CONSTRAINT "votes_author_subject_uniq" UNIQUE("author_did","subject_uri") +); +--> statement-breakpoint +CREATE TABLE "tracked_repos" ( + "did" text PRIMARY KEY NOT NULL, + "tracked_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE "community_settings" ( + "community_did" text PRIMARY KEY NOT NULL, + "domains" jsonb DEFAULT '[]'::jsonb NOT NULL, + "initialized" boolean DEFAULT false NOT NULL, + "admin_did" text, + "community_name" text DEFAULT 'Barazo Community' NOT NULL, + "maturity_rating" text DEFAULT 'safe' NOT NULL, + "reaction_set" jsonb DEFAULT '["like"]'::jsonb NOT NULL, + "moderation_thresholds" jsonb DEFAULT '{"autoBlockReportCount":5,"warnThreshold":3,"firstPostQueueCount":3,"newAccountDays":7,"newAccountWriteRatePerMin":3,"establishedWriteRatePerMin":10,"linkHoldEnabled":true,"topicCreationDelayEnabled":true,"burstPostCount":5,"burstWindowMinutes":10,"trustedPostThreshold":10}'::jsonb NOT NULL, + "word_filter" jsonb DEFAULT '[]'::jsonb NOT NULL, + "jurisdiction_country" text, + "age_threshold" integer DEFAULT 16 NOT NULL, + "require_login_for_mature" boolean DEFAULT true NOT NULL, + "community_description" text, + "handle" text, + "service_endpoint" text, + "signing_key" text, + "rotation_key" text, + "community_logo_url" text, + "primary_color" text, + "accent_color" text, + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +ALTER TABLE "community_settings" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "categories" ( + "id" text PRIMARY KEY NOT NULL, + "slug" text NOT NULL, + "name" text NOT NULL, + "description" text, + "parent_id" text, + "sort_order" integer DEFAULT 0 NOT NULL, + "community_did" text NOT NULL, + "maturity_rating" text DEFAULT 'safe' NOT NULL, + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +ALTER TABLE "categories" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "moderation_actions" ( + "id" serial PRIMARY KEY NOT NULL, + "action" text NOT NULL, + "target_uri" text, + "target_did" text, + "moderator_did" text NOT NULL, + "community_did" text NOT NULL, + "reason" text, + "created_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +ALTER TABLE "moderation_actions" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "reports" ( + "id" serial PRIMARY KEY NOT NULL, + "reporter_did" text NOT NULL, + "target_uri" text NOT NULL, + "target_did" text NOT NULL, + "reason_type" text NOT NULL, + "description" text, + "community_did" text NOT NULL, + "status" text DEFAULT 'pending' NOT NULL, + "resolution_type" text, + "resolved_by" text, + "resolved_at" timestamp with time zone, + "appeal_reason" text, + "appealed_at" timestamp with time zone, + "appeal_status" text DEFAULT 'none' NOT NULL, + "created_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +ALTER TABLE "reports" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "notifications" ( + "id" serial PRIMARY KEY NOT NULL, + "recipient_did" text NOT NULL, + "type" text NOT NULL, + "subject_uri" text NOT NULL, + "actor_did" text NOT NULL, + "community_did" text NOT NULL, + "read" boolean DEFAULT false NOT NULL, + "created_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +ALTER TABLE "notifications" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "user_community_preferences" ( + "did" text NOT NULL, + "community_did" text NOT NULL, + "maturity_override" text, + "muted_words" jsonb, + "blocked_dids" jsonb, + "muted_dids" jsonb, + "notification_prefs" jsonb, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL, + CONSTRAINT "user_community_preferences_did_community_did_pk" PRIMARY KEY("did","community_did") +); +--> statement-breakpoint +ALTER TABLE "user_community_preferences" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "user_preferences" ( + "did" text PRIMARY KEY NOT NULL, + "maturity_level" text DEFAULT 'sfw' NOT NULL, + "declared_age" integer, + "muted_words" jsonb DEFAULT '[]'::jsonb NOT NULL, + "blocked_dids" jsonb DEFAULT '[]'::jsonb NOT NULL, + "muted_dids" jsonb DEFAULT '[]'::jsonb NOT NULL, + "cross_post_bluesky" boolean DEFAULT false NOT NULL, + "cross_post_frontpage" boolean DEFAULT false NOT NULL, + "cross_post_scopes_granted" boolean DEFAULT false NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE "cross_posts" ( + "id" text PRIMARY KEY NOT NULL, + "topic_uri" text NOT NULL, + "service" text NOT NULL, + "cross_post_uri" text NOT NULL, + "cross_post_cid" text NOT NULL, + "author_did" text NOT NULL, + "created_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE "community_onboarding_fields" ( + "id" text PRIMARY KEY NOT NULL, + "community_did" text NOT NULL, + "field_type" text NOT NULL, + "label" text NOT NULL, + "description" text, + "is_mandatory" boolean DEFAULT true NOT NULL, + "sort_order" integer DEFAULT 0 NOT NULL, + "config" jsonb, + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +ALTER TABLE "community_onboarding_fields" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "user_onboarding_responses" ( + "did" text NOT NULL, + "community_did" text NOT NULL, + "field_id" text NOT NULL, + "response" jsonb NOT NULL, + "completed_at" timestamp with time zone DEFAULT now() NOT NULL, + CONSTRAINT "user_onboarding_responses_did_community_did_field_id_pk" PRIMARY KEY("did","community_did","field_id") +); +--> statement-breakpoint +ALTER TABLE "user_onboarding_responses" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "moderation_queue" ( + "id" serial PRIMARY KEY NOT NULL, + "content_uri" text NOT NULL, + "content_type" text NOT NULL, + "author_did" text NOT NULL, + "community_did" text NOT NULL, + "queue_reason" text NOT NULL, + "matched_words" jsonb, + "status" text DEFAULT 'pending' NOT NULL, + "reviewed_by" text, + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "reviewed_at" timestamp with time zone +); +--> statement-breakpoint +ALTER TABLE "moderation_queue" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "account_trust" ( + "id" serial PRIMARY KEY NOT NULL, + "did" text NOT NULL, + "community_did" text NOT NULL, + "approved_post_count" integer DEFAULT 0 NOT NULL, + "is_trusted" boolean DEFAULT false NOT NULL, + "trusted_at" timestamp with time zone +); +--> statement-breakpoint +ALTER TABLE "account_trust" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "community_filters" ( + "community_did" text PRIMARY KEY NOT NULL, + "status" text DEFAULT 'active' NOT NULL, + "admin_did" text, + "reason" text, + "report_count" integer DEFAULT 0 NOT NULL, + "last_reviewed_at" timestamp with time zone, + "filtered_by" text, + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +ALTER TABLE "community_filters" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "account_filters" ( + "id" serial PRIMARY KEY NOT NULL, + "did" text NOT NULL, + "community_did" text NOT NULL, + "status" text DEFAULT 'active' NOT NULL, + "reason" text, + "report_count" integer DEFAULT 0 NOT NULL, + "ban_count" integer DEFAULT 0 NOT NULL, + "last_reviewed_at" timestamp with time zone, + "filtered_by" text, + "created_at" timestamp with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +ALTER TABLE "account_filters" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "ozone_labels" ( + "id" serial PRIMARY KEY NOT NULL, + "src" text NOT NULL, + "uri" text NOT NULL, + "val" text NOT NULL, + "neg" boolean DEFAULT false NOT NULL, + "cts" timestamp with time zone NOT NULL, + "exp" timestamp with time zone, + "indexed_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE "community_profiles" ( + "did" text NOT NULL, + "community_did" text NOT NULL, + "display_name" text, + "avatar_url" text, + "banner_url" text, + "bio" text, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL, + CONSTRAINT "community_profiles_did_community_did_pk" PRIMARY KEY("did","community_did") +); +--> statement-breakpoint +ALTER TABLE "community_profiles" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "interaction_graph" ( + "source_did" text NOT NULL, + "target_did" text NOT NULL, + "community_id" text NOT NULL, + "interaction_type" text NOT NULL, + "weight" integer DEFAULT 1 NOT NULL, + "first_interaction_at" timestamp with time zone DEFAULT now() NOT NULL, + "last_interaction_at" timestamp with time zone DEFAULT now() NOT NULL, + CONSTRAINT "interaction_graph_source_did_target_did_community_id_interaction_type_pk" PRIMARY KEY("source_did","target_did","community_id","interaction_type") +); +--> statement-breakpoint +CREATE TABLE "trust_seeds" ( + "id" serial PRIMARY KEY NOT NULL, + "did" text NOT NULL, + "community_id" text DEFAULT '' NOT NULL, + "added_by" text NOT NULL, + "reason" text, + "created_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE "trust_scores" ( + "did" text NOT NULL, + "community_id" text DEFAULT '' NOT NULL, + "score" real NOT NULL, + "computed_at" timestamp with time zone DEFAULT now() NOT NULL, + CONSTRAINT "trust_scores_did_community_id_pk" PRIMARY KEY("did","community_id") +); +--> statement-breakpoint +CREATE TABLE "sybil_clusters" ( + "id" serial PRIMARY KEY NOT NULL, + "cluster_hash" text NOT NULL, + "internal_edge_count" integer NOT NULL, + "external_edge_count" integer NOT NULL, + "member_count" integer NOT NULL, + "status" text DEFAULT 'flagged' NOT NULL, + "reviewed_by" text, + "reviewed_at" timestamp with time zone, + "detected_at" timestamp with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE "sybil_cluster_members" ( + "cluster_id" integer NOT NULL, + "did" text NOT NULL, + "role_in_cluster" text NOT NULL, + "joined_at" timestamp with time zone DEFAULT now() NOT NULL, + CONSTRAINT "sybil_cluster_members_cluster_id_did_pk" PRIMARY KEY("cluster_id","did") +); +--> statement-breakpoint +CREATE TABLE "behavioral_flags" ( + "id" serial PRIMARY KEY NOT NULL, + "flag_type" text NOT NULL, + "affected_dids" jsonb NOT NULL, + "details" text NOT NULL, + "community_did" text, + "status" text DEFAULT 'pending' NOT NULL, + "detected_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE "pds_trust_factors" ( + "id" serial PRIMARY KEY NOT NULL, + "pds_host" text NOT NULL, + "trust_factor" real NOT NULL, + "is_default" boolean DEFAULT false NOT NULL, + "updated_at" timestamp with time zone DEFAULT now() NOT NULL +); +--> statement-breakpoint +ALTER TABLE "categories" ADD CONSTRAINT "categories_parent_id_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."categories"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "sybil_cluster_members" ADD CONSTRAINT "sybil_cluster_members_cluster_id_sybil_clusters_id_fk" FOREIGN KEY ("cluster_id") REFERENCES "public"."sybil_clusters"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +CREATE INDEX "users_role_elevated_idx" ON "users" USING btree ("role") WHERE role IN ('moderator', 'admin');--> statement-breakpoint +CREATE INDEX "users_handle_idx" ON "users" USING btree ("handle");--> statement-breakpoint +CREATE INDEX "users_account_created_at_idx" ON "users" USING btree ("account_created_at");--> statement-breakpoint +CREATE INDEX "topics_author_did_idx" ON "topics" USING btree ("author_did");--> statement-breakpoint +CREATE INDEX "topics_category_idx" ON "topics" USING btree ("category");--> statement-breakpoint +CREATE INDEX "topics_created_at_idx" ON "topics" USING btree ("created_at");--> statement-breakpoint +CREATE INDEX "topics_last_activity_at_idx" ON "topics" USING btree ("last_activity_at");--> statement-breakpoint +CREATE INDEX "topics_community_did_idx" ON "topics" USING btree ("community_did");--> statement-breakpoint +CREATE INDEX "topics_moderation_status_idx" ON "topics" USING btree ("moderation_status");--> statement-breakpoint +CREATE INDEX "topics_trust_status_idx" ON "topics" USING btree ("trust_status");--> statement-breakpoint +CREATE INDEX "topics_community_category_activity_idx" ON "topics" USING btree ("community_did","category","last_activity_at");--> statement-breakpoint +CREATE INDEX "replies_author_did_idx" ON "replies" USING btree ("author_did");--> statement-breakpoint +CREATE INDEX "replies_root_uri_idx" ON "replies" USING btree ("root_uri");--> statement-breakpoint +CREATE INDEX "replies_parent_uri_idx" ON "replies" USING btree ("parent_uri");--> statement-breakpoint +CREATE INDEX "replies_created_at_idx" ON "replies" USING btree ("created_at");--> statement-breakpoint +CREATE INDEX "replies_community_did_idx" ON "replies" USING btree ("community_did");--> statement-breakpoint +CREATE INDEX "replies_moderation_status_idx" ON "replies" USING btree ("moderation_status");--> statement-breakpoint +CREATE INDEX "replies_trust_status_idx" ON "replies" USING btree ("trust_status");--> statement-breakpoint +CREATE INDEX "replies_root_uri_created_at_idx" ON "replies" USING btree ("root_uri","created_at");--> statement-breakpoint +CREATE INDEX "reactions_author_did_idx" ON "reactions" USING btree ("author_did");--> statement-breakpoint +CREATE INDEX "reactions_subject_uri_idx" ON "reactions" USING btree ("subject_uri");--> statement-breakpoint +CREATE INDEX "reactions_community_did_idx" ON "reactions" USING btree ("community_did");--> statement-breakpoint +CREATE INDEX "reactions_subject_uri_type_idx" ON "reactions" USING btree ("subject_uri","type");--> statement-breakpoint +CREATE INDEX "votes_author_did_idx" ON "votes" USING btree ("author_did");--> statement-breakpoint +CREATE INDEX "votes_subject_uri_idx" ON "votes" USING btree ("subject_uri");--> statement-breakpoint +CREATE INDEX "votes_community_did_idx" ON "votes" USING btree ("community_did");--> statement-breakpoint +CREATE UNIQUE INDEX "categories_slug_community_did_idx" ON "categories" USING btree ("slug","community_did");--> statement-breakpoint +CREATE INDEX "categories_parent_id_idx" ON "categories" USING btree ("parent_id");--> statement-breakpoint +CREATE INDEX "categories_community_did_idx" ON "categories" USING btree ("community_did");--> statement-breakpoint +CREATE INDEX "categories_maturity_rating_idx" ON "categories" USING btree ("maturity_rating");--> statement-breakpoint +CREATE INDEX "mod_actions_moderator_did_idx" ON "moderation_actions" USING btree ("moderator_did");--> statement-breakpoint +CREATE INDEX "mod_actions_community_did_idx" ON "moderation_actions" USING btree ("community_did");--> statement-breakpoint +CREATE INDEX "mod_actions_created_at_idx" ON "moderation_actions" USING btree ("created_at");--> statement-breakpoint +CREATE INDEX "mod_actions_target_uri_idx" ON "moderation_actions" USING btree ("target_uri");--> statement-breakpoint +CREATE INDEX "mod_actions_target_did_idx" ON "moderation_actions" USING btree ("target_did");--> statement-breakpoint +CREATE INDEX "reports_reporter_did_idx" ON "reports" USING btree ("reporter_did");--> statement-breakpoint +CREATE INDEX "reports_target_uri_idx" ON "reports" USING btree ("target_uri");--> statement-breakpoint +CREATE INDEX "reports_target_did_idx" ON "reports" USING btree ("target_did");--> statement-breakpoint +CREATE INDEX "reports_community_did_idx" ON "reports" USING btree ("community_did");--> statement-breakpoint +CREATE INDEX "reports_status_idx" ON "reports" USING btree ("status");--> statement-breakpoint +CREATE INDEX "reports_created_at_idx" ON "reports" USING btree ("created_at");--> statement-breakpoint +CREATE UNIQUE INDEX "reports_unique_reporter_target_idx" ON "reports" USING btree ("reporter_did","target_uri","community_did");--> statement-breakpoint +CREATE INDEX "notifications_recipient_did_idx" ON "notifications" USING btree ("recipient_did");--> statement-breakpoint +CREATE INDEX "notifications_recipient_read_idx" ON "notifications" USING btree ("recipient_did","read");--> statement-breakpoint +CREATE INDEX "notifications_created_at_idx" ON "notifications" USING btree ("created_at");--> statement-breakpoint +CREATE INDEX "user_community_prefs_did_idx" ON "user_community_preferences" USING btree ("did");--> statement-breakpoint +CREATE INDEX "user_community_prefs_community_idx" ON "user_community_preferences" USING btree ("community_did");--> statement-breakpoint +CREATE INDEX "cross_posts_topic_uri_idx" ON "cross_posts" USING btree ("topic_uri");--> statement-breakpoint +CREATE INDEX "cross_posts_author_did_idx" ON "cross_posts" USING btree ("author_did");--> statement-breakpoint +CREATE INDEX "onboarding_fields_community_idx" ON "community_onboarding_fields" USING btree ("community_did");--> statement-breakpoint +CREATE INDEX "onboarding_responses_did_community_idx" ON "user_onboarding_responses" USING btree ("did","community_did");--> statement-breakpoint +CREATE INDEX "mod_queue_author_did_idx" ON "moderation_queue" USING btree ("author_did");--> statement-breakpoint +CREATE INDEX "mod_queue_community_did_idx" ON "moderation_queue" USING btree ("community_did");--> statement-breakpoint +CREATE INDEX "mod_queue_status_idx" ON "moderation_queue" USING btree ("status");--> statement-breakpoint +CREATE INDEX "mod_queue_created_at_idx" ON "moderation_queue" USING btree ("created_at");--> statement-breakpoint +CREATE INDEX "mod_queue_content_uri_idx" ON "moderation_queue" USING btree ("content_uri");--> statement-breakpoint +CREATE UNIQUE INDEX "account_trust_did_community_idx" ON "account_trust" USING btree ("did","community_did");--> statement-breakpoint +CREATE INDEX "account_trust_did_idx" ON "account_trust" USING btree ("did");--> statement-breakpoint +CREATE INDEX "community_filters_status_idx" ON "community_filters" USING btree ("status");--> statement-breakpoint +CREATE INDEX "community_filters_admin_did_idx" ON "community_filters" USING btree ("admin_did");--> statement-breakpoint +CREATE INDEX "community_filters_updated_at_idx" ON "community_filters" USING btree ("updated_at");--> statement-breakpoint +CREATE UNIQUE INDEX "account_filters_did_community_idx" ON "account_filters" USING btree ("did","community_did");--> statement-breakpoint +CREATE INDEX "account_filters_did_idx" ON "account_filters" USING btree ("did");--> statement-breakpoint +CREATE INDEX "account_filters_community_did_idx" ON "account_filters" USING btree ("community_did");--> statement-breakpoint +CREATE INDEX "account_filters_status_idx" ON "account_filters" USING btree ("status");--> statement-breakpoint +CREATE INDEX "account_filters_updated_at_idx" ON "account_filters" USING btree ("updated_at");--> statement-breakpoint +CREATE UNIQUE INDEX "ozone_labels_src_uri_val_idx" ON "ozone_labels" USING btree ("src","uri","val");--> statement-breakpoint +CREATE INDEX "ozone_labels_uri_idx" ON "ozone_labels" USING btree ("uri");--> statement-breakpoint +CREATE INDEX "ozone_labels_val_idx" ON "ozone_labels" USING btree ("val");--> statement-breakpoint +CREATE INDEX "ozone_labels_indexed_at_idx" ON "ozone_labels" USING btree ("indexed_at");--> statement-breakpoint +CREATE INDEX "community_profiles_did_idx" ON "community_profiles" USING btree ("did");--> statement-breakpoint +CREATE INDEX "community_profiles_community_idx" ON "community_profiles" USING btree ("community_did");--> statement-breakpoint +CREATE INDEX "interaction_graph_source_target_community_idx" ON "interaction_graph" USING btree ("source_did","target_did","community_id");--> statement-breakpoint +CREATE UNIQUE INDEX "trust_seeds_did_community_idx" ON "trust_seeds" USING btree ("did","community_id");--> statement-breakpoint +CREATE INDEX "trust_scores_did_community_idx" ON "trust_scores" USING btree ("did","community_id");--> statement-breakpoint +CREATE UNIQUE INDEX "sybil_clusters_hash_idx" ON "sybil_clusters" USING btree ("cluster_hash");--> statement-breakpoint +CREATE INDEX "behavioral_flags_flag_type_idx" ON "behavioral_flags" USING btree ("flag_type");--> statement-breakpoint +CREATE INDEX "behavioral_flags_status_idx" ON "behavioral_flags" USING btree ("status");--> statement-breakpoint +CREATE INDEX "behavioral_flags_detected_at_idx" ON "behavioral_flags" USING btree ("detected_at");--> statement-breakpoint +CREATE UNIQUE INDEX "pds_trust_factors_pds_host_idx" ON "pds_trust_factors" USING btree ("pds_host");--> statement-breakpoint +CREATE POLICY "tenant_isolation" ON "topics" AS PERMISSIVE FOR ALL TO "barazo_app" USING (community_did = current_setting('app.current_community_did', true)) WITH CHECK (community_did = current_setting('app.current_community_did', true));--> statement-breakpoint +CREATE POLICY "tenant_isolation" ON "replies" AS PERMISSIVE FOR ALL TO "barazo_app" USING (community_did = current_setting('app.current_community_did', true)) WITH CHECK (community_did = current_setting('app.current_community_did', true));--> statement-breakpoint +CREATE POLICY "tenant_isolation" ON "reactions" AS PERMISSIVE FOR ALL TO "barazo_app" USING (community_did = current_setting('app.current_community_did', true)) WITH CHECK (community_did = current_setting('app.current_community_did', true));--> statement-breakpoint +CREATE POLICY "tenant_isolation" ON "community_settings" AS PERMISSIVE FOR ALL TO "barazo_app" USING (community_did = current_setting('app.current_community_did', true)) WITH CHECK (community_did = current_setting('app.current_community_did', true));--> statement-breakpoint +CREATE POLICY "tenant_isolation" ON "categories" AS PERMISSIVE FOR ALL TO "barazo_app" USING (community_did = current_setting('app.current_community_did', true)) WITH CHECK (community_did = current_setting('app.current_community_did', true));--> statement-breakpoint +CREATE POLICY "tenant_isolation" ON "moderation_actions" AS PERMISSIVE FOR ALL TO "barazo_app" USING (community_did = current_setting('app.current_community_did', true)) WITH CHECK (community_did = current_setting('app.current_community_did', true));--> statement-breakpoint +CREATE POLICY "tenant_isolation" ON "reports" AS PERMISSIVE FOR ALL TO "barazo_app" USING (community_did = current_setting('app.current_community_did', true)) WITH CHECK (community_did = current_setting('app.current_community_did', true));--> statement-breakpoint +CREATE POLICY "tenant_isolation" ON "notifications" AS PERMISSIVE FOR ALL TO "barazo_app" USING (community_did = current_setting('app.current_community_did', true)) WITH CHECK (community_did = current_setting('app.current_community_did', true));--> statement-breakpoint +CREATE POLICY "tenant_isolation" ON "user_community_preferences" AS PERMISSIVE FOR ALL TO "barazo_app" USING (community_did = current_setting('app.current_community_did', true)) WITH CHECK (community_did = current_setting('app.current_community_did', true));--> statement-breakpoint +CREATE POLICY "tenant_isolation" ON "community_onboarding_fields" AS PERMISSIVE FOR ALL TO "barazo_app" USING (community_did = current_setting('app.current_community_did', true)) WITH CHECK (community_did = current_setting('app.current_community_did', true));--> statement-breakpoint +CREATE POLICY "tenant_isolation" ON "user_onboarding_responses" AS PERMISSIVE FOR ALL TO "barazo_app" USING (community_did = current_setting('app.current_community_did', true)) WITH CHECK (community_did = current_setting('app.current_community_did', true));--> statement-breakpoint +CREATE POLICY "tenant_isolation" ON "moderation_queue" AS PERMISSIVE FOR ALL TO "barazo_app" USING (community_did = current_setting('app.current_community_did', true)) WITH CHECK (community_did = current_setting('app.current_community_did', true));--> statement-breakpoint +CREATE POLICY "tenant_isolation" ON "account_trust" AS PERMISSIVE FOR ALL TO "barazo_app" USING (community_did = current_setting('app.current_community_did', true)) WITH CHECK (community_did = current_setting('app.current_community_did', true));--> statement-breakpoint +CREATE POLICY "tenant_isolation" ON "community_filters" AS PERMISSIVE FOR ALL TO "barazo_app" USING (community_did = current_setting('app.current_community_did', true)) WITH CHECK (community_did = current_setting('app.current_community_did', true));--> statement-breakpoint +CREATE POLICY "tenant_isolation" ON "account_filters" AS PERMISSIVE FOR ALL TO "barazo_app" USING (community_did = current_setting('app.current_community_did', true)) WITH CHECK (community_did = current_setting('app.current_community_did', true));--> statement-breakpoint +CREATE POLICY "tenant_isolation" ON "community_profiles" AS PERMISSIVE FOR ALL TO "barazo_app" USING (community_did = current_setting('app.current_community_did', true)) WITH CHECK (community_did = current_setting('app.current_community_did', true)); \ No newline at end of file diff --git a/drizzle/0000_new_ink.sql b/drizzle/0000_new_ink.sql deleted file mode 100644 index a5c9620..0000000 --- a/drizzle/0000_new_ink.sql +++ /dev/null @@ -1,17 +0,0 @@ -CREATE TABLE "users" ( - "did" text PRIMARY KEY NOT NULL, - "handle" text NOT NULL, - "display_name" text, - "avatar_url" text, - "role" text DEFAULT 'user' NOT NULL, - "is_banned" boolean DEFAULT false NOT NULL, - "reputation_score" integer DEFAULT 0 NOT NULL, - "first_seen_at" timestamp with time zone DEFAULT now() NOT NULL, - "last_active_at" timestamp with time zone DEFAULT now() NOT NULL -); ---> statement-breakpoint -CREATE TABLE "firehose_cursor" ( - "id" text PRIMARY KEY DEFAULT 'default' NOT NULL, - "cursor" bigint, - "updated_at" timestamp with time zone DEFAULT now() NOT NULL -); diff --git a/drizzle/0001_aromatic_whirlwind.sql b/drizzle/0001_aromatic_whirlwind.sql deleted file mode 100644 index ec54efd..0000000 --- a/drizzle/0001_aromatic_whirlwind.sql +++ /dev/null @@ -1,70 +0,0 @@ -CREATE TABLE "topics" ( - "uri" text PRIMARY KEY NOT NULL, - "rkey" text NOT NULL, - "author_did" text NOT NULL, - "title" text NOT NULL, - "content" text NOT NULL, - "content_format" text, - "category" text NOT NULL, - "tags" jsonb, - "community_did" text NOT NULL, - "cid" text NOT NULL, - "labels" jsonb, - "reply_count" integer DEFAULT 0 NOT NULL, - "reaction_count" integer DEFAULT 0 NOT NULL, - "last_activity_at" timestamp with time zone DEFAULT now() NOT NULL, - "created_at" timestamp with time zone NOT NULL, - "indexed_at" timestamp with time zone DEFAULT now() NOT NULL, - "embedding" text -); ---> statement-breakpoint -CREATE TABLE "replies" ( - "uri" text PRIMARY KEY NOT NULL, - "rkey" text NOT NULL, - "author_did" text NOT NULL, - "content" text NOT NULL, - "content_format" text, - "root_uri" text NOT NULL, - "root_cid" text NOT NULL, - "parent_uri" text NOT NULL, - "parent_cid" text NOT NULL, - "community_did" text NOT NULL, - "cid" text NOT NULL, - "labels" jsonb, - "reaction_count" integer DEFAULT 0 NOT NULL, - "created_at" timestamp with time zone NOT NULL, - "indexed_at" timestamp with time zone DEFAULT now() NOT NULL, - "embedding" text -); ---> statement-breakpoint -CREATE TABLE "reactions" ( - "uri" text PRIMARY KEY NOT NULL, - "rkey" text NOT NULL, - "author_did" text NOT NULL, - "subject_uri" text NOT NULL, - "subject_cid" text NOT NULL, - "type" text NOT NULL, - "community_did" text NOT NULL, - "cid" text NOT NULL, - "created_at" timestamp with time zone NOT NULL, - "indexed_at" timestamp with time zone DEFAULT now() NOT NULL, - CONSTRAINT "reactions_author_subject_type_uniq" UNIQUE("author_did","subject_uri","type") -); ---> statement-breakpoint -CREATE TABLE "tracked_repos" ( - "did" text PRIMARY KEY NOT NULL, - "tracked_at" timestamp with time zone DEFAULT now() NOT NULL -); ---> statement-breakpoint -CREATE INDEX "topics_author_did_idx" ON "topics" USING btree ("author_did");--> statement-breakpoint -CREATE INDEX "topics_category_idx" ON "topics" USING btree ("category");--> statement-breakpoint -CREATE INDEX "topics_created_at_idx" ON "topics" USING btree ("created_at");--> statement-breakpoint -CREATE INDEX "topics_community_did_idx" ON "topics" USING btree ("community_did");--> statement-breakpoint -CREATE INDEX "replies_author_did_idx" ON "replies" USING btree ("author_did");--> statement-breakpoint -CREATE INDEX "replies_root_uri_idx" ON "replies" USING btree ("root_uri");--> statement-breakpoint -CREATE INDEX "replies_parent_uri_idx" ON "replies" USING btree ("parent_uri");--> statement-breakpoint -CREATE INDEX "replies_created_at_idx" ON "replies" USING btree ("created_at");--> statement-breakpoint -CREATE INDEX "replies_community_did_idx" ON "replies" USING btree ("community_did");--> statement-breakpoint -CREATE INDEX "reactions_author_did_idx" ON "reactions" USING btree ("author_did");--> statement-breakpoint -CREATE INDEX "reactions_subject_uri_idx" ON "reactions" USING btree ("subject_uri");--> statement-breakpoint -CREATE INDEX "reactions_community_did_idx" ON "reactions" USING btree ("community_did"); \ No newline at end of file diff --git a/drizzle/0002_illegal_red_skull.sql b/drizzle/0002_illegal_red_skull.sql deleted file mode 100644 index 2ccb7e4..0000000 --- a/drizzle/0002_illegal_red_skull.sql +++ /dev/null @@ -1,8 +0,0 @@ -CREATE TABLE "community_settings" ( - "id" text PRIMARY KEY DEFAULT 'default' NOT NULL, - "initialized" boolean DEFAULT false NOT NULL, - "community_did" text, - "community_name" text DEFAULT 'Barazo Community' NOT NULL, - "created_at" timestamp with time zone DEFAULT now() NOT NULL, - "updated_at" timestamp with time zone DEFAULT now() NOT NULL -); diff --git a/drizzle/0003_flowery_wilson_fisk.sql b/drizzle/0003_flowery_wilson_fisk.sql deleted file mode 100644 index ac72187..0000000 --- a/drizzle/0003_flowery_wilson_fisk.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "community_settings" ADD COLUMN "admin_did" text; \ No newline at end of file diff --git a/drizzle/0004_petite_steve_rogers.sql b/drizzle/0004_petite_steve_rogers.sql deleted file mode 100644 index fd2b34a..0000000 --- a/drizzle/0004_petite_steve_rogers.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE INDEX "topics_last_activity_at_idx" ON "topics" USING btree ("last_activity_at"); \ No newline at end of file diff --git a/drizzle/0005_silly_smasher.sql b/drizzle/0005_silly_smasher.sql deleted file mode 100644 index 9ba0805..0000000 --- a/drizzle/0005_silly_smasher.sql +++ /dev/null @@ -1,19 +0,0 @@ -CREATE TABLE "categories" ( - "id" text PRIMARY KEY NOT NULL, - "slug" text NOT NULL, - "name" text NOT NULL, - "description" text, - "parent_id" text, - "sort_order" integer DEFAULT 0 NOT NULL, - "community_did" text NOT NULL, - "maturity_rating" text DEFAULT 'safe' NOT NULL, - "created_at" timestamp with time zone DEFAULT now() NOT NULL, - "updated_at" timestamp with time zone DEFAULT now() NOT NULL -); ---> statement-breakpoint -ALTER TABLE "users" ADD COLUMN "age_declared_at" timestamp with time zone;--> statement-breakpoint -ALTER TABLE "community_settings" ADD COLUMN "maturity_rating" text DEFAULT 'safe' NOT NULL;--> statement-breakpoint -CREATE UNIQUE INDEX "categories_slug_community_did_idx" ON "categories" USING btree ("slug","community_did");--> statement-breakpoint -CREATE INDEX "categories_parent_id_idx" ON "categories" USING btree ("parent_id");--> statement-breakpoint -CREATE INDEX "categories_community_did_idx" ON "categories" USING btree ("community_did");--> statement-breakpoint -CREATE INDEX "categories_maturity_rating_idx" ON "categories" USING btree ("maturity_rating"); diff --git a/drizzle/0006_absent_domino.sql b/drizzle/0006_absent_domino.sql deleted file mode 100644 index 2ee4119..0000000 --- a/drizzle/0006_absent_domino.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "categories" ADD CONSTRAINT "categories_parent_id_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."categories"("id") ON DELETE set null ON UPDATE no action; diff --git a/drizzle/0007_boring_killmonger.sql b/drizzle/0007_boring_killmonger.sql deleted file mode 100644 index 3cbb7de..0000000 --- a/drizzle/0007_boring_killmonger.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "users" ADD COLUMN "maturity_pref" text DEFAULT 'safe' NOT NULL; diff --git a/drizzle/0008_exotic_korg.sql b/drizzle/0008_exotic_korg.sql deleted file mode 100644 index d585226..0000000 --- a/drizzle/0008_exotic_korg.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "community_settings" ADD COLUMN "reaction_set" jsonb DEFAULT '["like"]'::jsonb NOT NULL; \ No newline at end of file diff --git a/drizzle/0009_chemical_dakota_north.sql b/drizzle/0009_chemical_dakota_north.sql deleted file mode 100644 index c4aba8a..0000000 --- a/drizzle/0009_chemical_dakota_north.sql +++ /dev/null @@ -1,43 +0,0 @@ -CREATE TABLE "moderation_actions" ( - "id" serial PRIMARY KEY NOT NULL, - "action" text NOT NULL, - "target_uri" text, - "target_did" text, - "moderator_did" text NOT NULL, - "community_did" text NOT NULL, - "reason" text, - "created_at" timestamp with time zone DEFAULT now() NOT NULL -); ---> statement-breakpoint -CREATE TABLE "reports" ( - "id" serial PRIMARY KEY NOT NULL, - "reporter_did" text NOT NULL, - "target_uri" text NOT NULL, - "target_did" text NOT NULL, - "reason_type" text NOT NULL, - "description" text, - "community_did" text NOT NULL, - "status" text DEFAULT 'pending' NOT NULL, - "resolution_type" text, - "resolved_by" text, - "resolved_at" timestamp with time zone, - "created_at" timestamp with time zone DEFAULT now() NOT NULL -); ---> statement-breakpoint -ALTER TABLE "topics" ADD COLUMN "is_locked" boolean DEFAULT false NOT NULL;--> statement-breakpoint -ALTER TABLE "topics" ADD COLUMN "is_pinned" boolean DEFAULT false NOT NULL;--> statement-breakpoint -ALTER TABLE "topics" ADD COLUMN "is_mod_deleted" boolean DEFAULT false NOT NULL;--> statement-breakpoint -ALTER TABLE "community_settings" ADD COLUMN "moderation_thresholds" jsonb DEFAULT '{"autoBlockReportCount":5,"warnThreshold":3}'::jsonb NOT NULL;--> statement-breakpoint -ALTER TABLE "community_settings" ADD COLUMN "word_filter" jsonb DEFAULT '[]'::jsonb NOT NULL;--> statement-breakpoint -CREATE INDEX "mod_actions_moderator_did_idx" ON "moderation_actions" USING btree ("moderator_did");--> statement-breakpoint -CREATE INDEX "mod_actions_community_did_idx" ON "moderation_actions" USING btree ("community_did");--> statement-breakpoint -CREATE INDEX "mod_actions_created_at_idx" ON "moderation_actions" USING btree ("created_at");--> statement-breakpoint -CREATE INDEX "mod_actions_target_uri_idx" ON "moderation_actions" USING btree ("target_uri");--> statement-breakpoint -CREATE INDEX "mod_actions_target_did_idx" ON "moderation_actions" USING btree ("target_did");--> statement-breakpoint -CREATE INDEX "reports_reporter_did_idx" ON "reports" USING btree ("reporter_did");--> statement-breakpoint -CREATE INDEX "reports_target_uri_idx" ON "reports" USING btree ("target_uri");--> statement-breakpoint -CREATE INDEX "reports_target_did_idx" ON "reports" USING btree ("target_did");--> statement-breakpoint -CREATE INDEX "reports_community_did_idx" ON "reports" USING btree ("community_did");--> statement-breakpoint -CREATE INDEX "reports_status_idx" ON "reports" USING btree ("status");--> statement-breakpoint -CREATE INDEX "reports_created_at_idx" ON "reports" USING btree ("created_at");--> statement-breakpoint -CREATE UNIQUE INDEX "reports_unique_reporter_target_idx" ON "reports" USING btree ("reporter_did","target_uri","community_did"); \ No newline at end of file diff --git a/drizzle/0010_dear_phil_sheldon.sql b/drizzle/0010_dear_phil_sheldon.sql deleted file mode 100644 index 8e53d87..0000000 --- a/drizzle/0010_dear_phil_sheldon.sql +++ /dev/null @@ -1,58 +0,0 @@ --- M8: Full-text search + optional semantic search --- Drops placeholder text embedding columns and replaces with proper types. --- Adds pgvector extension, tsvector search columns, GIN/HNSW indexes, and triggers. - --- Remove placeholder text embedding columns (no data exists yet) -ALTER TABLE "topics" DROP COLUMN IF EXISTS "embedding";--> statement-breakpoint -ALTER TABLE "replies" DROP COLUMN IF EXISTS "embedding";--> statement-breakpoint - --- Install pgvector extension for semantic search -CREATE EXTENSION IF NOT EXISTS vector;--> statement-breakpoint - --- Add tsvector columns for full-text search -ALTER TABLE "topics" ADD COLUMN "search_vector" tsvector;--> statement-breakpoint -ALTER TABLE "replies" ADD COLUMN "search_vector" tsvector;--> statement-breakpoint - --- Add vector columns for semantic search (nullable -- only populated when EMBEDDING_URL configured) -ALTER TABLE "topics" ADD COLUMN "embedding" vector(768);--> statement-breakpoint -ALTER TABLE "replies" ADD COLUMN "embedding" vector(768);--> statement-breakpoint - --- GIN indexes for full-text search performance -CREATE INDEX "topics_search_vector_idx" ON "topics" USING gin ("search_vector");--> statement-breakpoint -CREATE INDEX "replies_search_vector_idx" ON "replies" USING gin ("search_vector");--> statement-breakpoint - --- HNSW indexes for vector similarity search performance -CREATE INDEX "topics_embedding_idx" ON "topics" USING hnsw ("embedding" vector_cosine_ops);--> statement-breakpoint -CREATE INDEX "replies_embedding_idx" ON "replies" USING hnsw ("embedding" vector_cosine_ops);--> statement-breakpoint - --- Trigger function: auto-update topics search_vector on insert/update --- Title weighted A (highest), content weighted B -CREATE OR REPLACE FUNCTION update_topic_search_vector() -RETURNS trigger AS $$ -BEGIN - NEW.search_vector := - setweight(to_tsvector('english', COALESCE(NEW.title, '')), 'A') || - setweight(to_tsvector('english', COALESCE(NEW.content, '')), 'B'); - RETURN NEW; -END; -$$ LANGUAGE plpgsql;--> statement-breakpoint - -CREATE TRIGGER topic_search_vector_update - BEFORE INSERT OR UPDATE OF title, content ON topics - FOR EACH ROW - EXECUTE FUNCTION update_topic_search_vector();--> statement-breakpoint - --- Trigger function: auto-update replies search_vector on insert/update -CREATE OR REPLACE FUNCTION update_reply_search_vector() -RETURNS trigger AS $$ -BEGIN - NEW.search_vector := - to_tsvector('english', COALESCE(NEW.content, '')); - RETURN NEW; -END; -$$ LANGUAGE plpgsql;--> statement-breakpoint - -CREATE TRIGGER reply_search_vector_update - BEFORE INSERT OR UPDATE OF content ON replies - FOR EACH ROW - EXECUTE FUNCTION update_reply_search_vector(); diff --git a/drizzle/0011_fresh_veda.sql b/drizzle/0011_fresh_veda.sql deleted file mode 100644 index 8f9e974..0000000 --- a/drizzle/0011_fresh_veda.sql +++ /dev/null @@ -1,14 +0,0 @@ -CREATE TABLE "notifications" ( - "id" serial PRIMARY KEY NOT NULL, - "recipient_did" text NOT NULL, - "type" text NOT NULL, - "subject_uri" text NOT NULL, - "actor_did" text NOT NULL, - "community_did" text NOT NULL, - "read" boolean DEFAULT false NOT NULL, - "created_at" timestamp with time zone DEFAULT now() NOT NULL -); ---> statement-breakpoint -CREATE INDEX "notifications_recipient_did_idx" ON "notifications" USING btree ("recipient_did");--> statement-breakpoint -CREATE INDEX "notifications_recipient_read_idx" ON "notifications" USING btree ("recipient_did","read");--> statement-breakpoint -CREATE INDEX "notifications_created_at_idx" ON "notifications" USING btree ("created_at"); \ No newline at end of file diff --git a/drizzle/0012_swift_tony_stark.sql b/drizzle/0012_swift_tony_stark.sql deleted file mode 100644 index 66bd971..0000000 --- a/drizzle/0012_swift_tony_stark.sql +++ /dev/null @@ -1,26 +0,0 @@ -CREATE TABLE "user_community_preferences" ( - "did" text NOT NULL, - "community_did" text NOT NULL, - "maturity_override" text, - "muted_words" jsonb, - "blocked_dids" jsonb, - "muted_dids" jsonb, - "notification_prefs" jsonb, - "updated_at" timestamp with time zone DEFAULT now() NOT NULL, - CONSTRAINT "user_community_preferences_did_community_did_pk" PRIMARY KEY("did","community_did") -); ---> statement-breakpoint -CREATE TABLE "user_preferences" ( - "did" text PRIMARY KEY NOT NULL, - "maturity_level" text DEFAULT 'sfw' NOT NULL, - "age_declaration_at" timestamp with time zone, - "muted_words" jsonb DEFAULT '[]'::jsonb NOT NULL, - "blocked_dids" jsonb DEFAULT '[]'::jsonb NOT NULL, - "muted_dids" jsonb DEFAULT '[]'::jsonb NOT NULL, - "cross_post_bluesky" boolean DEFAULT false NOT NULL, - "cross_post_frontpage" boolean DEFAULT false NOT NULL, - "updated_at" timestamp with time zone DEFAULT now() NOT NULL -); ---> statement-breakpoint -CREATE INDEX "user_community_prefs_did_idx" ON "user_community_preferences" USING btree ("did");--> statement-breakpoint -CREATE INDEX "user_community_prefs_community_idx" ON "user_community_preferences" USING btree ("community_did"); \ No newline at end of file diff --git a/drizzle/0013_rapid_deathstrike.sql b/drizzle/0013_rapid_deathstrike.sql deleted file mode 100644 index b71d9ea..0000000 --- a/drizzle/0013_rapid_deathstrike.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE "community_settings" ADD COLUMN "community_description" text;--> statement-breakpoint -ALTER TABLE "community_settings" ADD COLUMN "community_logo_url" text;--> statement-breakpoint -ALTER TABLE "community_settings" ADD COLUMN "primary_color" text;--> statement-breakpoint -ALTER TABLE "community_settings" ADD COLUMN "accent_color" text; \ No newline at end of file diff --git a/drizzle/0014_easy_the_leader.sql b/drizzle/0014_easy_the_leader.sql deleted file mode 100644 index 4bf2552..0000000 --- a/drizzle/0014_easy_the_leader.sql +++ /dev/null @@ -1,12 +0,0 @@ -CREATE TABLE "cross_posts" ( - "id" text PRIMARY KEY NOT NULL, - "topic_uri" text NOT NULL, - "service" text NOT NULL, - "cross_post_uri" text NOT NULL, - "cross_post_cid" text NOT NULL, - "author_did" text NOT NULL, - "created_at" timestamp with time zone DEFAULT now() NOT NULL -); ---> statement-breakpoint -CREATE INDEX "cross_posts_topic_uri_idx" ON "cross_posts" USING btree ("topic_uri");--> statement-breakpoint -CREATE INDEX "cross_posts_author_did_idx" ON "cross_posts" USING btree ("author_did"); \ No newline at end of file diff --git a/drizzle/0015_fixed_sunset_bain.sql b/drizzle/0015_fixed_sunset_bain.sql deleted file mode 100644 index e71a556..0000000 --- a/drizzle/0015_fixed_sunset_bain.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE "community_settings" ADD COLUMN "handle" text;--> statement-breakpoint -ALTER TABLE "community_settings" ADD COLUMN "service_endpoint" text;--> statement-breakpoint -ALTER TABLE "community_settings" ADD COLUMN "signing_key" text;--> statement-breakpoint -ALTER TABLE "community_settings" ADD COLUMN "rotation_key" text; \ No newline at end of file diff --git a/drizzle/0016_curved_lake.sql b/drizzle/0016_curved_lake.sql deleted file mode 100644 index 2ae2c14..0000000 --- a/drizzle/0016_curved_lake.sql +++ /dev/null @@ -1,7 +0,0 @@ -ALTER TABLE "users" ADD COLUMN "declared_age" integer;--> statement-breakpoint -ALTER TABLE "community_settings" ADD COLUMN "jurisdiction_country" text;--> statement-breakpoint -ALTER TABLE "community_settings" ADD COLUMN "age_threshold" integer DEFAULT 16 NOT NULL;--> statement-breakpoint -ALTER TABLE "community_settings" ADD COLUMN "require_login_for_mature" boolean DEFAULT true NOT NULL;--> statement-breakpoint -ALTER TABLE "user_preferences" ADD COLUMN "declared_age" integer;--> statement-breakpoint -ALTER TABLE "users" DROP COLUMN "age_declared_at";--> statement-breakpoint -ALTER TABLE "user_preferences" DROP COLUMN "age_declaration_at"; \ No newline at end of file diff --git a/drizzle/0017_empty_leper_queen.sql b/drizzle/0017_empty_leper_queen.sql deleted file mode 100644 index ccf0252..0000000 --- a/drizzle/0017_empty_leper_queen.sql +++ /dev/null @@ -1,24 +0,0 @@ -CREATE TABLE "community_onboarding_fields" ( - "id" text PRIMARY KEY NOT NULL, - "community_did" text NOT NULL, - "field_type" text NOT NULL, - "label" text NOT NULL, - "description" text, - "is_mandatory" boolean DEFAULT true NOT NULL, - "sort_order" integer DEFAULT 0 NOT NULL, - "config" jsonb, - "created_at" timestamp with time zone DEFAULT now() NOT NULL, - "updated_at" timestamp with time zone DEFAULT now() NOT NULL -); ---> statement-breakpoint -CREATE TABLE "user_onboarding_responses" ( - "did" text NOT NULL, - "community_did" text NOT NULL, - "field_id" text NOT NULL, - "response" jsonb NOT NULL, - "completed_at" timestamp with time zone DEFAULT now() NOT NULL, - CONSTRAINT "user_onboarding_responses_did_community_did_field_id_pk" PRIMARY KEY("did","community_did","field_id") -); ---> statement-breakpoint -CREATE INDEX "onboarding_fields_community_idx" ON "community_onboarding_fields" USING btree ("community_did");--> statement-breakpoint -CREATE INDEX "onboarding_responses_did_community_idx" ON "user_onboarding_responses" USING btree ("did","community_did"); \ No newline at end of file diff --git a/drizzle/0018_shocking_pet_avengers.sql b/drizzle/0018_shocking_pet_avengers.sql deleted file mode 100644 index 9000b81..0000000 --- a/drizzle/0018_shocking_pet_avengers.sql +++ /dev/null @@ -1,35 +0,0 @@ -CREATE TABLE "moderation_queue" ( - "id" serial PRIMARY KEY NOT NULL, - "content_uri" text NOT NULL, - "content_type" text NOT NULL, - "author_did" text NOT NULL, - "community_did" text NOT NULL, - "queue_reason" text NOT NULL, - "matched_words" jsonb, - "status" text DEFAULT 'pending' NOT NULL, - "reviewed_by" text, - "created_at" timestamp with time zone DEFAULT now() NOT NULL, - "reviewed_at" timestamp with time zone -); ---> statement-breakpoint -CREATE TABLE "account_trust" ( - "id" serial PRIMARY KEY NOT NULL, - "did" text NOT NULL, - "community_did" text NOT NULL, - "approved_post_count" integer DEFAULT 0 NOT NULL, - "is_trusted" boolean DEFAULT false NOT NULL, - "trusted_at" timestamp with time zone -); ---> statement-breakpoint -ALTER TABLE "community_settings" ALTER COLUMN "moderation_thresholds" SET DEFAULT '{"autoBlockReportCount":5,"warnThreshold":3,"firstPostQueueCount":3,"newAccountDays":7,"newAccountWriteRatePerMin":3,"establishedWriteRatePerMin":10,"linkHoldEnabled":true,"topicCreationDelayEnabled":true,"burstPostCount":5,"burstWindowMinutes":10,"trustedPostThreshold":10}'::jsonb;--> statement-breakpoint -ALTER TABLE "topics" ADD COLUMN "moderation_status" text DEFAULT 'approved' NOT NULL;--> statement-breakpoint -ALTER TABLE "replies" ADD COLUMN "moderation_status" text DEFAULT 'approved' NOT NULL;--> statement-breakpoint -CREATE INDEX "mod_queue_author_did_idx" ON "moderation_queue" USING btree ("author_did");--> statement-breakpoint -CREATE INDEX "mod_queue_community_did_idx" ON "moderation_queue" USING btree ("community_did");--> statement-breakpoint -CREATE INDEX "mod_queue_status_idx" ON "moderation_queue" USING btree ("status");--> statement-breakpoint -CREATE INDEX "mod_queue_created_at_idx" ON "moderation_queue" USING btree ("created_at");--> statement-breakpoint -CREATE INDEX "mod_queue_content_uri_idx" ON "moderation_queue" USING btree ("content_uri");--> statement-breakpoint -CREATE UNIQUE INDEX "account_trust_did_community_idx" ON "account_trust" USING btree ("did","community_did");--> statement-breakpoint -CREATE INDEX "account_trust_did_idx" ON "account_trust" USING btree ("did");--> statement-breakpoint -CREATE INDEX "topics_moderation_status_idx" ON "topics" USING btree ("moderation_status");--> statement-breakpoint -CREATE INDEX "replies_moderation_status_idx" ON "replies" USING btree ("moderation_status"); \ No newline at end of file diff --git a/drizzle/0019_account_age_trust.sql b/drizzle/0019_account_age_trust.sql deleted file mode 100644 index 54289a9..0000000 --- a/drizzle/0019_account_age_trust.sql +++ /dev/null @@ -1,13 +0,0 @@ --- Migration: Add account age heuristic for new account trust scoring --- Adds account_created_at to users (resolved from PLC directory on first encounter) --- Adds trust_status to topics and replies (set based on account age at indexing time) - -ALTER TABLE "users" ADD COLUMN "account_created_at" timestamp with time zone; - -ALTER TABLE "topics" ADD COLUMN "trust_status" text NOT NULL DEFAULT 'trusted'; - -ALTER TABLE "replies" ADD COLUMN "trust_status" text NOT NULL DEFAULT 'trusted'; - -CREATE INDEX "topics_trust_status_idx" ON "topics" USING btree ("trust_status"); - -CREATE INDEX "replies_trust_status_idx" ON "replies" USING btree ("trust_status"); diff --git a/drizzle/0020_colorful_night_thrasher.sql b/drizzle/0020_colorful_night_thrasher.sql deleted file mode 100644 index 9a7fd0d..0000000 --- a/drizzle/0020_colorful_night_thrasher.sql +++ /dev/null @@ -1,49 +0,0 @@ -CREATE TABLE "community_filters" ( - "community_did" text PRIMARY KEY NOT NULL, - "status" text DEFAULT 'active' NOT NULL, - "admin_did" text, - "reason" text, - "report_count" integer DEFAULT 0 NOT NULL, - "last_reviewed_at" timestamp with time zone, - "filtered_by" text, - "created_at" timestamp with time zone DEFAULT now() NOT NULL, - "updated_at" timestamp with time zone DEFAULT now() NOT NULL -); ---> statement-breakpoint -CREATE TABLE "account_filters" ( - "id" serial PRIMARY KEY NOT NULL, - "did" text NOT NULL, - "community_did" text NOT NULL, - "status" text DEFAULT 'active' NOT NULL, - "reason" text, - "report_count" integer DEFAULT 0 NOT NULL, - "ban_count" integer DEFAULT 0 NOT NULL, - "last_reviewed_at" timestamp with time zone, - "filtered_by" text, - "created_at" timestamp with time zone DEFAULT now() NOT NULL, - "updated_at" timestamp with time zone DEFAULT now() NOT NULL -); ---> statement-breakpoint -CREATE TABLE "ozone_labels" ( - "id" serial PRIMARY KEY NOT NULL, - "src" text NOT NULL, - "uri" text NOT NULL, - "val" text NOT NULL, - "neg" boolean DEFAULT false NOT NULL, - "cts" timestamp with time zone NOT NULL, - "exp" timestamp with time zone, - "indexed_at" timestamp with time zone DEFAULT now() NOT NULL -); ---> statement-breakpoint -CREATE INDEX "community_filters_status_idx" ON "community_filters" USING btree ("status");--> statement-breakpoint -CREATE INDEX "community_filters_admin_did_idx" ON "community_filters" USING btree ("admin_did");--> statement-breakpoint -CREATE INDEX "community_filters_updated_at_idx" ON "community_filters" USING btree ("updated_at");--> statement-breakpoint -CREATE UNIQUE INDEX "account_filters_did_community_idx" ON "account_filters" USING btree ("did","community_did");--> statement-breakpoint -CREATE INDEX "account_filters_did_idx" ON "account_filters" USING btree ("did");--> statement-breakpoint -CREATE INDEX "account_filters_community_did_idx" ON "account_filters" USING btree ("community_did");--> statement-breakpoint -CREATE INDEX "account_filters_status_idx" ON "account_filters" USING btree ("status");--> statement-breakpoint -CREATE INDEX "account_filters_updated_at_idx" ON "account_filters" USING btree ("updated_at");--> statement-breakpoint -CREATE UNIQUE INDEX "ozone_labels_src_uri_val_idx" ON "ozone_labels" USING btree ("src","uri","val");--> statement-breakpoint -CREATE INDEX "ozone_labels_uri_idx" ON "ozone_labels" USING btree ("uri");--> statement-breakpoint -CREATE INDEX "ozone_labels_val_idx" ON "ozone_labels" USING btree ("val");--> statement-breakpoint -CREATE INDEX "ozone_labels_indexed_at_idx" ON "ozone_labels" USING btree ("indexed_at"); \ No newline at end of file diff --git a/drizzle/0021_mute_night_thrasher.sql b/drizzle/0021_mute_night_thrasher.sql deleted file mode 100644 index 1c3d943..0000000 --- a/drizzle/0021_mute_night_thrasher.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE "reports" ADD COLUMN "appeal_reason" text;--> statement-breakpoint -ALTER TABLE "reports" ADD COLUMN "appealed_at" timestamp with time zone;--> statement-breakpoint -ALTER TABLE "reports" ADD COLUMN "appeal_status" text DEFAULT 'none' NOT NULL; \ No newline at end of file diff --git a/drizzle/0022_workable_ezekiel.sql b/drizzle/0022_workable_ezekiel.sql deleted file mode 100644 index 485bc91..0000000 --- a/drizzle/0022_workable_ezekiel.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "users" ADD COLUMN "banner_url" text;--> statement-breakpoint -ALTER TABLE "users" ADD COLUMN "bio" text; \ No newline at end of file diff --git a/drizzle/0023_flimsy_donald_blake.sql b/drizzle/0023_flimsy_donald_blake.sql deleted file mode 100644 index 632bbdb..0000000 --- a/drizzle/0023_flimsy_donald_blake.sql +++ /dev/null @@ -1,13 +0,0 @@ -CREATE TABLE "community_profiles" ( - "did" text NOT NULL, - "community_did" text NOT NULL, - "display_name" text, - "avatar_url" text, - "banner_url" text, - "bio" text, - "updated_at" timestamp with time zone DEFAULT now() NOT NULL, - CONSTRAINT "community_profiles_did_community_did_pk" PRIMARY KEY("did","community_did") -); ---> statement-breakpoint -CREATE INDEX "community_profiles_did_idx" ON "community_profiles" USING btree ("did");--> statement-breakpoint -CREATE INDEX "community_profiles_community_idx" ON "community_profiles" USING btree ("community_did"); \ No newline at end of file diff --git a/drizzle/0024_grey_skreet.sql b/drizzle/0024_grey_skreet.sql deleted file mode 100644 index 93c8e27..0000000 --- a/drizzle/0024_grey_skreet.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "user_preferences" ADD COLUMN "cross_post_scopes_granted" boolean DEFAULT false NOT NULL; \ No newline at end of file diff --git a/drizzle/0025_author_soft_delete.sql b/drizzle/0025_author_soft_delete.sql deleted file mode 100644 index 4714be8..0000000 --- a/drizzle/0025_author_soft_delete.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "topics" ADD COLUMN "is_author_deleted" boolean DEFAULT false NOT NULL; -ALTER TABLE "replies" ADD COLUMN "is_author_deleted" boolean DEFAULT false NOT NULL; diff --git a/drizzle/0026_composite_indexes.sql b/drizzle/0026_composite_indexes.sql deleted file mode 100644 index a8d0066..0000000 --- a/drizzle/0026_composite_indexes.sql +++ /dev/null @@ -1,3 +0,0 @@ -CREATE INDEX IF NOT EXISTS "topics_community_category_activity_idx" ON "topics" ("community_did","category","last_activity_at"); -CREATE INDEX IF NOT EXISTS "replies_root_uri_created_at_idx" ON "replies" ("root_uri","created_at"); -CREATE INDEX IF NOT EXISTS "reactions_subject_uri_type_idx" ON "reactions" ("subject_uri","type"); diff --git a/drizzle/0027_sad_spencer_smythe.sql b/drizzle/0027_sad_spencer_smythe.sql deleted file mode 100644 index ea6fd78..0000000 --- a/drizzle/0027_sad_spencer_smythe.sql +++ /dev/null @@ -1,3 +0,0 @@ -CREATE INDEX IF NOT EXISTS "users_role_elevated_idx" ON "users" USING btree ("role") WHERE role IN ('moderator', 'admin'); -CREATE INDEX IF NOT EXISTS "users_handle_idx" ON "users" USING btree ("handle"); -CREATE INDEX IF NOT EXISTS "users_account_created_at_idx" ON "users" USING btree ("account_created_at"); diff --git a/drizzle/0028_reply_mod_deleted.sql b/drizzle/0028_reply_mod_deleted.sql deleted file mode 100644 index b915ea6..0000000 --- a/drizzle/0028_reply_mod_deleted.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "replies" ADD COLUMN "is_mod_deleted" boolean DEFAULT false NOT NULL; diff --git a/drizzle/0029_vote_system.sql b/drizzle/0029_vote_system.sql deleted file mode 100644 index 0423e36..0000000 --- a/drizzle/0029_vote_system.sql +++ /dev/null @@ -1,23 +0,0 @@ -CREATE TABLE IF NOT EXISTS "votes" ( - "uri" text PRIMARY KEY NOT NULL, - "rkey" text NOT NULL, - "author_did" text NOT NULL, - "subject_uri" text NOT NULL, - "subject_cid" text NOT NULL, - "direction" text NOT NULL, - "community_did" text NOT NULL, - "cid" text NOT NULL, - "created_at" timestamp with time zone NOT NULL, - "indexed_at" timestamp with time zone DEFAULT now() NOT NULL, - CONSTRAINT "votes_author_subject_uniq" UNIQUE("author_did","subject_uri") -); ---> statement-breakpoint -CREATE INDEX IF NOT EXISTS "votes_author_did_idx" ON "votes" USING btree ("author_did"); ---> statement-breakpoint -CREATE INDEX IF NOT EXISTS "votes_subject_uri_idx" ON "votes" USING btree ("subject_uri"); ---> statement-breakpoint -CREATE INDEX IF NOT EXISTS "votes_community_did_idx" ON "votes" USING btree ("community_did"); ---> statement-breakpoint -ALTER TABLE "topics" ADD COLUMN "vote_count" integer DEFAULT 0 NOT NULL; ---> statement-breakpoint -ALTER TABLE "replies" ADD COLUMN "vote_count" integer DEFAULT 0 NOT NULL; diff --git a/drizzle/0030_atproto_profile_stats.sql b/drizzle/0030_atproto_profile_stats.sql deleted file mode 100644 index 48f514a..0000000 --- a/drizzle/0030_atproto_profile_stats.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE "users" ADD COLUMN "followers_count" integer DEFAULT 0 NOT NULL; -ALTER TABLE "users" ADD COLUMN "follows_count" integer DEFAULT 0 NOT NULL; -ALTER TABLE "users" ADD COLUMN "atproto_posts_count" integer DEFAULT 0 NOT NULL; -ALTER TABLE "users" ADD COLUMN "has_bluesky_profile" boolean DEFAULT false NOT NULL; diff --git a/drizzle/0031_atproto_labels.sql b/drizzle/0031_atproto_labels.sql deleted file mode 100644 index 7892c1e..0000000 --- a/drizzle/0031_atproto_labels.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "users" ADD COLUMN "atproto_labels" jsonb DEFAULT '[]'::jsonb NOT NULL; \ No newline at end of file diff --git a/drizzle/meta/0000_snapshot.json b/drizzle/meta/0000_snapshot.json index f147d68..517232a 100644 --- a/drizzle/meta/0000_snapshot.json +++ b/drizzle/meta/0000_snapshot.json @@ -1,5 +1,5 @@ { - "id": "c85eafbe-186b-455c-be5e-3d722a29ac20", + "id": "021aacdb-67eb-4c57-93aa-7f7166a8e364", "prevId": "00000000-0000-0000-0000-000000000000", "version": "7", "dialect": "postgresql", @@ -32,6 +32,18 @@ "primaryKey": false, "notNull": false }, + "banner_url": { + "name": "banner_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "bio": { + "name": "bio", + "type": "text", + "primaryKey": false, + "notNull": false + }, "role": { "name": "role", "type": "text", @@ -66,9 +78,110 @@ "primaryKey": false, "notNull": true, "default": "now()" + }, + "declared_age": { + "name": "declared_age", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "maturity_pref": { + "name": "maturity_pref", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'safe'" + }, + "account_created_at": { + "name": "account_created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "followers_count": { + "name": "followers_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "follows_count": { + "name": "follows_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "atproto_posts_count": { + "name": "atproto_posts_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "has_bluesky_profile": { + "name": "has_bluesky_profile", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "atproto_labels": { + "name": "atproto_labels", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + } + }, + "indexes": { + "users_role_elevated_idx": { + "name": "users_role_elevated_idx", + "columns": [ + { + "expression": "role", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "role IN ('moderator', 'admin')", + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_handle_idx": { + "name": "users_handle_idx", + "columns": [ + { + "expression": "handle", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_account_created_at_idx": { + "name": "users_account_created_at_idx", + "columns": [ + { + "expression": "account_created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} } }, - "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, @@ -108,12 +221,3536 @@ "policies": {}, "checkConstraints": {}, "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, + }, + "public.topics": { + "name": "topics", + "schema": "", + "columns": { + "uri": { + "name": "uri", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "rkey": { + "name": "rkey", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "author_did": { + "name": "author_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content_format": { + "name": "content_format", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "category": { + "name": "category", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tags": { + "name": "tags", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "community_did": { + "name": "community_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "cid": { + "name": "cid", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "labels": { + "name": "labels", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "reply_count": { + "name": "reply_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "reaction_count": { + "name": "reaction_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "vote_count": { + "name": "vote_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "last_activity_at": { + "name": "last_activity_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "indexed_at": { + "name": "indexed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "is_locked": { + "name": "is_locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "is_pinned": { + "name": "is_pinned", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "is_mod_deleted": { + "name": "is_mod_deleted", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "is_author_deleted": { + "name": "is_author_deleted", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "moderation_status": { + "name": "moderation_status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'approved'" + }, + "trust_status": { + "name": "trust_status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'trusted'" + } + }, + "indexes": { + "topics_author_did_idx": { + "name": "topics_author_did_idx", + "columns": [ + { + "expression": "author_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "topics_category_idx": { + "name": "topics_category_idx", + "columns": [ + { + "expression": "category", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "topics_created_at_idx": { + "name": "topics_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "topics_last_activity_at_idx": { + "name": "topics_last_activity_at_idx", + "columns": [ + { + "expression": "last_activity_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "topics_community_did_idx": { + "name": "topics_community_did_idx", + "columns": [ + { + "expression": "community_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "topics_moderation_status_idx": { + "name": "topics_moderation_status_idx", + "columns": [ + { + "expression": "moderation_status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "topics_trust_status_idx": { + "name": "topics_trust_status_idx", + "columns": [ + { + "expression": "trust_status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "topics_community_category_activity_idx": { + "name": "topics_community_category_activity_idx", + "columns": [ + { + "expression": "community_did", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "category", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "last_activity_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": { + "tenant_isolation": { + "name": "tenant_isolation", + "as": "PERMISSIVE", + "for": "ALL", + "to": ["barazo_app"], + "using": "community_did = current_setting('app.current_community_did', true)", + "withCheck": "community_did = current_setting('app.current_community_did', true)" + } + }, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.replies": { + "name": "replies", + "schema": "", + "columns": { + "uri": { + "name": "uri", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "rkey": { + "name": "rkey", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "author_did": { + "name": "author_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content_format": { + "name": "content_format", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "root_uri": { + "name": "root_uri", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "root_cid": { + "name": "root_cid", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "parent_uri": { + "name": "parent_uri", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "parent_cid": { + "name": "parent_cid", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "community_did": { + "name": "community_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "cid": { + "name": "cid", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "labels": { + "name": "labels", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "reaction_count": { + "name": "reaction_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "vote_count": { + "name": "vote_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "indexed_at": { + "name": "indexed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "is_author_deleted": { + "name": "is_author_deleted", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "is_mod_deleted": { + "name": "is_mod_deleted", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "moderation_status": { + "name": "moderation_status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'approved'" + }, + "trust_status": { + "name": "trust_status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'trusted'" + } + }, + "indexes": { + "replies_author_did_idx": { + "name": "replies_author_did_idx", + "columns": [ + { + "expression": "author_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "replies_root_uri_idx": { + "name": "replies_root_uri_idx", + "columns": [ + { + "expression": "root_uri", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "replies_parent_uri_idx": { + "name": "replies_parent_uri_idx", + "columns": [ + { + "expression": "parent_uri", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "replies_created_at_idx": { + "name": "replies_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "replies_community_did_idx": { + "name": "replies_community_did_idx", + "columns": [ + { + "expression": "community_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "replies_moderation_status_idx": { + "name": "replies_moderation_status_idx", + "columns": [ + { + "expression": "moderation_status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "replies_trust_status_idx": { + "name": "replies_trust_status_idx", + "columns": [ + { + "expression": "trust_status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "replies_root_uri_created_at_idx": { + "name": "replies_root_uri_created_at_idx", + "columns": [ + { + "expression": "root_uri", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": { + "tenant_isolation": { + "name": "tenant_isolation", + "as": "PERMISSIVE", + "for": "ALL", + "to": ["barazo_app"], + "using": "community_did = current_setting('app.current_community_did', true)", + "withCheck": "community_did = current_setting('app.current_community_did', true)" + } + }, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.reactions": { + "name": "reactions", + "schema": "", + "columns": { + "uri": { + "name": "uri", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "rkey": { + "name": "rkey", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "author_did": { + "name": "author_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "subject_uri": { + "name": "subject_uri", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "subject_cid": { + "name": "subject_cid", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "community_did": { + "name": "community_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "cid": { + "name": "cid", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "indexed_at": { + "name": "indexed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "reactions_author_did_idx": { + "name": "reactions_author_did_idx", + "columns": [ + { + "expression": "author_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "reactions_subject_uri_idx": { + "name": "reactions_subject_uri_idx", + "columns": [ + { + "expression": "subject_uri", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "reactions_community_did_idx": { + "name": "reactions_community_did_idx", + "columns": [ + { + "expression": "community_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "reactions_subject_uri_type_idx": { + "name": "reactions_subject_uri_type_idx", + "columns": [ + { + "expression": "subject_uri", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "reactions_author_subject_type_uniq": { + "name": "reactions_author_subject_type_uniq", + "nullsNotDistinct": false, + "columns": ["author_did", "subject_uri", "type"] + } + }, + "policies": { + "tenant_isolation": { + "name": "tenant_isolation", + "as": "PERMISSIVE", + "for": "ALL", + "to": ["barazo_app"], + "using": "community_did = current_setting('app.current_community_did', true)", + "withCheck": "community_did = current_setting('app.current_community_did', true)" + } + }, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.votes": { + "name": "votes", + "schema": "", + "columns": { + "uri": { + "name": "uri", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "rkey": { + "name": "rkey", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "author_did": { + "name": "author_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "subject_uri": { + "name": "subject_uri", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "subject_cid": { + "name": "subject_cid", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "direction": { + "name": "direction", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "community_did": { + "name": "community_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "cid": { + "name": "cid", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "indexed_at": { + "name": "indexed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "votes_author_did_idx": { + "name": "votes_author_did_idx", + "columns": [ + { + "expression": "author_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "votes_subject_uri_idx": { + "name": "votes_subject_uri_idx", + "columns": [ + { + "expression": "subject_uri", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "votes_community_did_idx": { + "name": "votes_community_did_idx", + "columns": [ + { + "expression": "community_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "votes_author_subject_uniq": { + "name": "votes_author_subject_uniq", + "nullsNotDistinct": false, + "columns": ["author_did", "subject_uri"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tracked_repos": { + "name": "tracked_repos", + "schema": "", + "columns": { + "did": { + "name": "did", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "tracked_at": { + "name": "tracked_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.community_settings": { + "name": "community_settings", + "schema": "", + "columns": { + "community_did": { + "name": "community_did", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "domains": { + "name": "domains", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "initialized": { + "name": "initialized", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "admin_did": { + "name": "admin_did", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "community_name": { + "name": "community_name", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'Barazo Community'" + }, + "maturity_rating": { + "name": "maturity_rating", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'safe'" + }, + "reaction_set": { + "name": "reaction_set", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[\"like\"]'::jsonb" + }, + "moderation_thresholds": { + "name": "moderation_thresholds", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{\"autoBlockReportCount\":5,\"warnThreshold\":3,\"firstPostQueueCount\":3,\"newAccountDays\":7,\"newAccountWriteRatePerMin\":3,\"establishedWriteRatePerMin\":10,\"linkHoldEnabled\":true,\"topicCreationDelayEnabled\":true,\"burstPostCount\":5,\"burstWindowMinutes\":10,\"trustedPostThreshold\":10}'::jsonb" + }, + "word_filter": { + "name": "word_filter", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "jurisdiction_country": { + "name": "jurisdiction_country", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "age_threshold": { + "name": "age_threshold", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 16 + }, + "require_login_for_mature": { + "name": "require_login_for_mature", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "community_description": { + "name": "community_description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "handle": { + "name": "handle", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "service_endpoint": { + "name": "service_endpoint", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "signing_key": { + "name": "signing_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "rotation_key": { + "name": "rotation_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "community_logo_url": { + "name": "community_logo_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "primary_color": { + "name": "primary_color", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "accent_color": { + "name": "accent_color", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": { + "tenant_isolation": { + "name": "tenant_isolation", + "as": "PERMISSIVE", + "for": "ALL", + "to": ["barazo_app"], + "using": "community_did = current_setting('app.current_community_did', true)", + "withCheck": "community_did = current_setting('app.current_community_did', true)" + } + }, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.categories": { + "name": "categories", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sort_order": { + "name": "sort_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "community_did": { + "name": "community_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "maturity_rating": { + "name": "maturity_rating", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'safe'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "categories_slug_community_did_idx": { + "name": "categories_slug_community_did_idx", + "columns": [ + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "community_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "categories_parent_id_idx": { + "name": "categories_parent_id_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "categories_community_did_idx": { + "name": "categories_community_did_idx", + "columns": [ + { + "expression": "community_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "categories_maturity_rating_idx": { + "name": "categories_maturity_rating_idx", + "columns": [ + { + "expression": "maturity_rating", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "categories_parent_id_fk": { + "name": "categories_parent_id_fk", + "tableFrom": "categories", + "tableTo": "categories", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": { + "tenant_isolation": { + "name": "tenant_isolation", + "as": "PERMISSIVE", + "for": "ALL", + "to": ["barazo_app"], + "using": "community_did = current_setting('app.current_community_did', true)", + "withCheck": "community_did = current_setting('app.current_community_did', true)" + } + }, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.moderation_actions": { + "name": "moderation_actions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "action": { + "name": "action", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_uri": { + "name": "target_uri", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "target_did": { + "name": "target_did", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "moderator_did": { + "name": "moderator_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "community_did": { + "name": "community_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "reason": { + "name": "reason", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "mod_actions_moderator_did_idx": { + "name": "mod_actions_moderator_did_idx", + "columns": [ + { + "expression": "moderator_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_actions_community_did_idx": { + "name": "mod_actions_community_did_idx", + "columns": [ + { + "expression": "community_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_actions_created_at_idx": { + "name": "mod_actions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_actions_target_uri_idx": { + "name": "mod_actions_target_uri_idx", + "columns": [ + { + "expression": "target_uri", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_actions_target_did_idx": { + "name": "mod_actions_target_did_idx", + "columns": [ + { + "expression": "target_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": { + "tenant_isolation": { + "name": "tenant_isolation", + "as": "PERMISSIVE", + "for": "ALL", + "to": ["barazo_app"], + "using": "community_did = current_setting('app.current_community_did', true)", + "withCheck": "community_did = current_setting('app.current_community_did', true)" + } + }, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.reports": { + "name": "reports", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "reporter_did": { + "name": "reporter_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_uri": { + "name": "target_uri", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_did": { + "name": "target_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "reason_type": { + "name": "reason_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "community_did": { + "name": "community_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "resolution_type": { + "name": "resolution_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "resolved_by": { + "name": "resolved_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "resolved_at": { + "name": "resolved_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "appeal_reason": { + "name": "appeal_reason", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "appealed_at": { + "name": "appealed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "appeal_status": { + "name": "appeal_status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'none'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "reports_reporter_did_idx": { + "name": "reports_reporter_did_idx", + "columns": [ + { + "expression": "reporter_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "reports_target_uri_idx": { + "name": "reports_target_uri_idx", + "columns": [ + { + "expression": "target_uri", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "reports_target_did_idx": { + "name": "reports_target_did_idx", + "columns": [ + { + "expression": "target_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "reports_community_did_idx": { + "name": "reports_community_did_idx", + "columns": [ + { + "expression": "community_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "reports_status_idx": { + "name": "reports_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "reports_created_at_idx": { + "name": "reports_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "reports_unique_reporter_target_idx": { + "name": "reports_unique_reporter_target_idx", + "columns": [ + { + "expression": "reporter_did", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_uri", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "community_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": { + "tenant_isolation": { + "name": "tenant_isolation", + "as": "PERMISSIVE", + "for": "ALL", + "to": ["barazo_app"], + "using": "community_did = current_setting('app.current_community_did', true)", + "withCheck": "community_did = current_setting('app.current_community_did', true)" + } + }, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.notifications": { + "name": "notifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "recipient_did": { + "name": "recipient_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "subject_uri": { + "name": "subject_uri", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "actor_did": { + "name": "actor_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "community_did": { + "name": "community_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "read": { + "name": "read", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "notifications_recipient_did_idx": { + "name": "notifications_recipient_did_idx", + "columns": [ + { + "expression": "recipient_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "notifications_recipient_read_idx": { + "name": "notifications_recipient_read_idx", + "columns": [ + { + "expression": "recipient_did", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "read", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "notifications_created_at_idx": { + "name": "notifications_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": { + "tenant_isolation": { + "name": "tenant_isolation", + "as": "PERMISSIVE", + "for": "ALL", + "to": ["barazo_app"], + "using": "community_did = current_setting('app.current_community_did', true)", + "withCheck": "community_did = current_setting('app.current_community_did', true)" + } + }, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.user_community_preferences": { + "name": "user_community_preferences", + "schema": "", + "columns": { + "did": { + "name": "did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "community_did": { + "name": "community_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "maturity_override": { + "name": "maturity_override", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "muted_words": { + "name": "muted_words", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "blocked_dids": { + "name": "blocked_dids", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "muted_dids": { + "name": "muted_dids", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "notification_prefs": { + "name": "notification_prefs", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "user_community_prefs_did_idx": { + "name": "user_community_prefs_did_idx", + "columns": [ + { + "expression": "did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_community_prefs_community_idx": { + "name": "user_community_prefs_community_idx", + "columns": [ + { + "expression": "community_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": { + "user_community_preferences_did_community_did_pk": { + "name": "user_community_preferences_did_community_did_pk", + "columns": ["did", "community_did"] + } + }, + "uniqueConstraints": {}, + "policies": { + "tenant_isolation": { + "name": "tenant_isolation", + "as": "PERMISSIVE", + "for": "ALL", + "to": ["barazo_app"], + "using": "community_did = current_setting('app.current_community_did', true)", + "withCheck": "community_did = current_setting('app.current_community_did', true)" + } + }, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.user_preferences": { + "name": "user_preferences", + "schema": "", + "columns": { + "did": { + "name": "did", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "maturity_level": { + "name": "maturity_level", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'sfw'" + }, + "declared_age": { + "name": "declared_age", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "muted_words": { + "name": "muted_words", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "blocked_dids": { + "name": "blocked_dids", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "muted_dids": { + "name": "muted_dids", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "cross_post_bluesky": { + "name": "cross_post_bluesky", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "cross_post_frontpage": { + "name": "cross_post_frontpage", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "cross_post_scopes_granted": { + "name": "cross_post_scopes_granted", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.cross_posts": { + "name": "cross_posts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "topic_uri": { + "name": "topic_uri", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "service": { + "name": "service", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "cross_post_uri": { + "name": "cross_post_uri", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "cross_post_cid": { + "name": "cross_post_cid", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "author_did": { + "name": "author_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "cross_posts_topic_uri_idx": { + "name": "cross_posts_topic_uri_idx", + "columns": [ + { + "expression": "topic_uri", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "cross_posts_author_did_idx": { + "name": "cross_posts_author_did_idx", + "columns": [ + { + "expression": "author_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.community_onboarding_fields": { + "name": "community_onboarding_fields", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "community_did": { + "name": "community_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "field_type": { + "name": "field_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_mandatory": { + "name": "is_mandatory", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "sort_order": { + "name": "sort_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "config": { + "name": "config", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "onboarding_fields_community_idx": { + "name": "onboarding_fields_community_idx", + "columns": [ + { + "expression": "community_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": { + "tenant_isolation": { + "name": "tenant_isolation", + "as": "PERMISSIVE", + "for": "ALL", + "to": ["barazo_app"], + "using": "community_did = current_setting('app.current_community_did', true)", + "withCheck": "community_did = current_setting('app.current_community_did', true)" + } + }, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.user_onboarding_responses": { + "name": "user_onboarding_responses", + "schema": "", + "columns": { + "did": { + "name": "did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "community_did": { + "name": "community_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "field_id": { + "name": "field_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "response": { + "name": "response", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "onboarding_responses_did_community_idx": { + "name": "onboarding_responses_did_community_idx", + "columns": [ + { + "expression": "did", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "community_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": { + "user_onboarding_responses_did_community_did_field_id_pk": { + "name": "user_onboarding_responses_did_community_did_field_id_pk", + "columns": ["did", "community_did", "field_id"] + } + }, + "uniqueConstraints": {}, + "policies": { + "tenant_isolation": { + "name": "tenant_isolation", + "as": "PERMISSIVE", + "for": "ALL", + "to": ["barazo_app"], + "using": "community_did = current_setting('app.current_community_did', true)", + "withCheck": "community_did = current_setting('app.current_community_did', true)" + } + }, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.moderation_queue": { + "name": "moderation_queue", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "content_uri": { + "name": "content_uri", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "author_did": { + "name": "author_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "community_did": { + "name": "community_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "queue_reason": { + "name": "queue_reason", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "matched_words": { + "name": "matched_words", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "reviewed_by": { + "name": "reviewed_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "reviewed_at": { + "name": "reviewed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "mod_queue_author_did_idx": { + "name": "mod_queue_author_did_idx", + "columns": [ + { + "expression": "author_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_queue_community_did_idx": { + "name": "mod_queue_community_did_idx", + "columns": [ + { + "expression": "community_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_queue_status_idx": { + "name": "mod_queue_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_queue_created_at_idx": { + "name": "mod_queue_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_queue_content_uri_idx": { + "name": "mod_queue_content_uri_idx", + "columns": [ + { + "expression": "content_uri", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": { + "tenant_isolation": { + "name": "tenant_isolation", + "as": "PERMISSIVE", + "for": "ALL", + "to": ["barazo_app"], + "using": "community_did = current_setting('app.current_community_did', true)", + "withCheck": "community_did = current_setting('app.current_community_did', true)" + } + }, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.account_trust": { + "name": "account_trust", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "did": { + "name": "did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "community_did": { + "name": "community_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "approved_post_count": { + "name": "approved_post_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "is_trusted": { + "name": "is_trusted", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "trusted_at": { + "name": "trusted_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "account_trust_did_community_idx": { + "name": "account_trust_did_community_idx", + "columns": [ + { + "expression": "did", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "community_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "account_trust_did_idx": { + "name": "account_trust_did_idx", + "columns": [ + { + "expression": "did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": { + "tenant_isolation": { + "name": "tenant_isolation", + "as": "PERMISSIVE", + "for": "ALL", + "to": ["barazo_app"], + "using": "community_did = current_setting('app.current_community_did', true)", + "withCheck": "community_did = current_setting('app.current_community_did', true)" + } + }, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.community_filters": { + "name": "community_filters", + "schema": "", + "columns": { + "community_did": { + "name": "community_did", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "admin_did": { + "name": "admin_did", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "reason": { + "name": "reason", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "report_count": { + "name": "report_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "last_reviewed_at": { + "name": "last_reviewed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "filtered_by": { + "name": "filtered_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "community_filters_status_idx": { + "name": "community_filters_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "community_filters_admin_did_idx": { + "name": "community_filters_admin_did_idx", + "columns": [ + { + "expression": "admin_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "community_filters_updated_at_idx": { + "name": "community_filters_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": { + "tenant_isolation": { + "name": "tenant_isolation", + "as": "PERMISSIVE", + "for": "ALL", + "to": ["barazo_app"], + "using": "community_did = current_setting('app.current_community_did', true)", + "withCheck": "community_did = current_setting('app.current_community_did', true)" + } + }, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.account_filters": { + "name": "account_filters", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "did": { + "name": "did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "community_did": { + "name": "community_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "reason": { + "name": "reason", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "report_count": { + "name": "report_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "ban_count": { + "name": "ban_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "last_reviewed_at": { + "name": "last_reviewed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "filtered_by": { + "name": "filtered_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "account_filters_did_community_idx": { + "name": "account_filters_did_community_idx", + "columns": [ + { + "expression": "did", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "community_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "account_filters_did_idx": { + "name": "account_filters_did_idx", + "columns": [ + { + "expression": "did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "account_filters_community_did_idx": { + "name": "account_filters_community_did_idx", + "columns": [ + { + "expression": "community_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "account_filters_status_idx": { + "name": "account_filters_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "account_filters_updated_at_idx": { + "name": "account_filters_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": { + "tenant_isolation": { + "name": "tenant_isolation", + "as": "PERMISSIVE", + "for": "ALL", + "to": ["barazo_app"], + "using": "community_did = current_setting('app.current_community_did', true)", + "withCheck": "community_did = current_setting('app.current_community_did', true)" + } + }, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.ozone_labels": { + "name": "ozone_labels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "src": { + "name": "src", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "val": { + "name": "val", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "neg": { + "name": "neg", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "cts": { + "name": "cts", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + }, + "exp": { + "name": "exp", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "indexed_at": { + "name": "indexed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ozone_labels_src_uri_val_idx": { + "name": "ozone_labels_src_uri_val_idx", + "columns": [ + { + "expression": "src", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "uri", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "val", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ozone_labels_uri_idx": { + "name": "ozone_labels_uri_idx", + "columns": [ + { + "expression": "uri", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ozone_labels_val_idx": { + "name": "ozone_labels_val_idx", + "columns": [ + { + "expression": "val", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ozone_labels_indexed_at_idx": { + "name": "ozone_labels_indexed_at_idx", + "columns": [ + { + "expression": "indexed_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.community_profiles": { + "name": "community_profiles", + "schema": "", + "columns": { + "did": { + "name": "did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "community_did": { + "name": "community_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "avatar_url": { + "name": "avatar_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "banner_url": { + "name": "banner_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "bio": { + "name": "bio", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "community_profiles_did_idx": { + "name": "community_profiles_did_idx", + "columns": [ + { + "expression": "did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "community_profiles_community_idx": { + "name": "community_profiles_community_idx", + "columns": [ + { + "expression": "community_did", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": { + "community_profiles_did_community_did_pk": { + "name": "community_profiles_did_community_did_pk", + "columns": ["did", "community_did"] + } + }, + "uniqueConstraints": {}, + "policies": { + "tenant_isolation": { + "name": "tenant_isolation", + "as": "PERMISSIVE", + "for": "ALL", + "to": ["barazo_app"], + "using": "community_did = current_setting('app.current_community_did', true)", + "withCheck": "community_did = current_setting('app.current_community_did', true)" + } + }, + "checkConstraints": {}, + "isRLSEnabled": true + }, + "public.interaction_graph": { + "name": "interaction_graph", + "schema": "", + "columns": { + "source_did": { + "name": "source_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_did": { + "name": "target_did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "community_id": { + "name": "community_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "interaction_type": { + "name": "interaction_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "weight": { + "name": "weight", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "first_interaction_at": { + "name": "first_interaction_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_interaction_at": { + "name": "last_interaction_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "interaction_graph_source_target_community_idx": { + "name": "interaction_graph_source_target_community_idx", + "columns": [ + { + "expression": "source_did", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_did", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "community_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": { + "interaction_graph_source_did_target_did_community_id_interaction_type_pk": { + "name": "interaction_graph_source_did_target_did_community_id_interaction_type_pk", + "columns": ["source_did", "target_did", "community_id", "interaction_type"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.trust_seeds": { + "name": "trust_seeds", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "did": { + "name": "did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "community_id": { + "name": "community_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "added_by": { + "name": "added_by", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "reason": { + "name": "reason", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "trust_seeds_did_community_idx": { + "name": "trust_seeds_did_community_idx", + "columns": [ + { + "expression": "did", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "community_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.trust_scores": { + "name": "trust_scores", + "schema": "", + "columns": { + "did": { + "name": "did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "community_id": { + "name": "community_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "score": { + "name": "score", + "type": "real", + "primaryKey": false, + "notNull": true + }, + "computed_at": { + "name": "computed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "trust_scores_did_community_idx": { + "name": "trust_scores_did_community_idx", + "columns": [ + { + "expression": "did", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "community_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": { + "trust_scores_did_community_id_pk": { + "name": "trust_scores_did_community_id_pk", + "columns": ["did", "community_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sybil_clusters": { + "name": "sybil_clusters", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "cluster_hash": { + "name": "cluster_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "internal_edge_count": { + "name": "internal_edge_count", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "external_edge_count": { + "name": "external_edge_count", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "member_count": { + "name": "member_count", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'flagged'" + }, + "reviewed_by": { + "name": "reviewed_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "reviewed_at": { + "name": "reviewed_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "detected_at": { + "name": "detected_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sybil_clusters_hash_idx": { + "name": "sybil_clusters_hash_idx", + "columns": [ + { + "expression": "cluster_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sybil_cluster_members": { + "name": "sybil_cluster_members", + "schema": "", + "columns": { + "cluster_id": { + "name": "cluster_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "did": { + "name": "did", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "role_in_cluster": { + "name": "role_in_cluster", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "joined_at": { + "name": "joined_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "sybil_cluster_members_cluster_id_sybil_clusters_id_fk": { + "name": "sybil_cluster_members_cluster_id_sybil_clusters_id_fk", + "tableFrom": "sybil_cluster_members", + "tableTo": "sybil_clusters", + "columnsFrom": ["cluster_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "sybil_cluster_members_cluster_id_did_pk": { + "name": "sybil_cluster_members_cluster_id_did_pk", + "columns": ["cluster_id", "did"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.behavioral_flags": { + "name": "behavioral_flags", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "flag_type": { + "name": "flag_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "affected_dids": { + "name": "affected_dids", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "details": { + "name": "details", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "community_did": { + "name": "community_did", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "detected_at": { + "name": "detected_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "behavioral_flags_flag_type_idx": { + "name": "behavioral_flags_flag_type_idx", + "columns": [ + { + "expression": "flag_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "behavioral_flags_status_idx": { + "name": "behavioral_flags_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "behavioral_flags_detected_at_idx": { + "name": "behavioral_flags_detected_at_idx", + "columns": [ + { + "expression": "detected_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pds_trust_factors": { + "name": "pds_trust_factors", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "pds_host": { + "name": "pds_host", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "trust_factor": { + "name": "trust_factor", + "type": "real", + "primaryKey": false, + "notNull": true + }, + "is_default": { + "name": "is_default", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "pds_trust_factors_pds_host_idx": { + "name": "pds_trust_factors_pds_host_idx", + "columns": [ + { + "expression": "pds_host", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": {}, + "schemas": {}, + "sequences": {}, + "roles": { + "barazo_app": { + "name": "barazo_app", + "createDb": false, + "createRole": false, + "inherit": true + } + }, "policies": {}, "views": {}, "_meta": { diff --git a/drizzle/meta/0001_snapshot.json b/drizzle/meta/0001_snapshot.json deleted file mode 100644 index e281e6f..0000000 --- a/drizzle/meta/0001_snapshot.json +++ /dev/null @@ -1,643 +0,0 @@ -{ - "id": "caadcced-ec53-4ca7-be24-c5124cab6408", - "prevId": "c85eafbe-186b-455c-be5e-3d722a29ac20", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "embedding": { - "name": "embedding", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "embedding": { - "name": "embedding", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0002_snapshot.json b/drizzle/meta/0002_snapshot.json deleted file mode 100644 index effbdd3..0000000 --- a/drizzle/meta/0002_snapshot.json +++ /dev/null @@ -1,697 +0,0 @@ -{ - "id": "e3dc35b2-b3c8-4e19-ae24-fe7739b30986", - "prevId": "caadcced-ec53-4ca7-be24-c5124cab6408", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "embedding": { - "name": "embedding", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "embedding": { - "name": "embedding", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0003_snapshot.json b/drizzle/meta/0003_snapshot.json deleted file mode 100644 index c0fa22b..0000000 --- a/drizzle/meta/0003_snapshot.json +++ /dev/null @@ -1,703 +0,0 @@ -{ - "id": "145e7310-a924-44ef-ba38-8da2af538eb0", - "prevId": "e3dc35b2-b3c8-4e19-ae24-fe7739b30986", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "embedding": { - "name": "embedding", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "embedding": { - "name": "embedding", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0004_snapshot.json b/drizzle/meta/0004_snapshot.json deleted file mode 100644 index cc27139..0000000 --- a/drizzle/meta/0004_snapshot.json +++ /dev/null @@ -1,718 +0,0 @@ -{ - "id": "556df1cc-e395-4861-8af3-b969ae172b01", - "prevId": "145e7310-a924-44ef-ba38-8da2af538eb0", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "embedding": { - "name": "embedding", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_last_activity_at_idx": { - "name": "topics_last_activity_at_idx", - "columns": [ - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "embedding": { - "name": "embedding", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0005_snapshot.json b/drizzle/meta/0005_snapshot.json deleted file mode 100644 index d53d384..0000000 --- a/drizzle/meta/0005_snapshot.json +++ /dev/null @@ -1,875 +0,0 @@ -{ - "id": "ac7285b2-f912-4131-b9d8-08b465192965", - "prevId": "556df1cc-e395-4861-8af3-b969ae172b01", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "age_declared_at": { - "name": "age_declared_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "embedding": { - "name": "embedding", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_last_activity_at_idx": { - "name": "topics_last_activity_at_idx", - "columns": [ - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "embedding": { - "name": "embedding", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.categories": { - "name": "categories", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "categories_slug_community_did_idx": { - "name": "categories_slug_community_did_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_parent_id_idx": { - "name": "categories_parent_id_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_community_did_idx": { - "name": "categories_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_maturity_rating_idx": { - "name": "categories_maturity_rating_idx", - "columns": [ - { - "expression": "maturity_rating", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0006_snapshot.json b/drizzle/meta/0006_snapshot.json deleted file mode 100644 index e15620c..0000000 --- a/drizzle/meta/0006_snapshot.json +++ /dev/null @@ -1,885 +0,0 @@ -{ - "id": "82bcb0de-d869-4dfb-832d-b9d00b923657", - "prevId": "ac7285b2-f912-4131-b9d8-08b465192965", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "age_declared_at": { - "name": "age_declared_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "embedding": { - "name": "embedding", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_last_activity_at_idx": { - "name": "topics_last_activity_at_idx", - "columns": [ - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "embedding": { - "name": "embedding", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.categories": { - "name": "categories", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "categories_slug_community_did_idx": { - "name": "categories_slug_community_did_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_parent_id_idx": { - "name": "categories_parent_id_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_community_did_idx": { - "name": "categories_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_maturity_rating_idx": { - "name": "categories_maturity_rating_idx", - "columns": [ - { - "expression": "maturity_rating", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "categories_parent_id_fk": { - "name": "categories_parent_id_fk", - "tableFrom": "categories", - "tableTo": "categories", - "columnsFrom": ["parent_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0007_snapshot.json b/drizzle/meta/0007_snapshot.json deleted file mode 100644 index 8c342a3..0000000 --- a/drizzle/meta/0007_snapshot.json +++ /dev/null @@ -1,892 +0,0 @@ -{ - "id": "9d4472f7-c9af-4b4e-b3a0-309d4489bf3d", - "prevId": "82bcb0de-d869-4dfb-832d-b9d00b923657", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "age_declared_at": { - "name": "age_declared_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "maturity_pref": { - "name": "maturity_pref", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "embedding": { - "name": "embedding", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_last_activity_at_idx": { - "name": "topics_last_activity_at_idx", - "columns": [ - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "embedding": { - "name": "embedding", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.categories": { - "name": "categories", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "categories_slug_community_did_idx": { - "name": "categories_slug_community_did_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_parent_id_idx": { - "name": "categories_parent_id_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_community_did_idx": { - "name": "categories_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_maturity_rating_idx": { - "name": "categories_maturity_rating_idx", - "columns": [ - { - "expression": "maturity_rating", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "categories_parent_id_fk": { - "name": "categories_parent_id_fk", - "tableFrom": "categories", - "tableTo": "categories", - "columnsFrom": ["parent_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0008_snapshot.json b/drizzle/meta/0008_snapshot.json deleted file mode 100644 index 4aaad0f..0000000 --- a/drizzle/meta/0008_snapshot.json +++ /dev/null @@ -1,899 +0,0 @@ -{ - "id": "f4896a3b-c827-4cc6-b7e2-86736e1d22bd", - "prevId": "9d4472f7-c9af-4b4e-b3a0-309d4489bf3d", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "age_declared_at": { - "name": "age_declared_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "maturity_pref": { - "name": "maturity_pref", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "embedding": { - "name": "embedding", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_last_activity_at_idx": { - "name": "topics_last_activity_at_idx", - "columns": [ - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "embedding": { - "name": "embedding", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "reaction_set": { - "name": "reaction_set", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[\"like\"]'::jsonb" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.categories": { - "name": "categories", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "categories_slug_community_did_idx": { - "name": "categories_slug_community_did_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_parent_id_idx": { - "name": "categories_parent_id_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_community_did_idx": { - "name": "categories_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_maturity_rating_idx": { - "name": "categories_maturity_rating_idx", - "columns": [ - { - "expression": "maturity_rating", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "categories_parent_id_fk": { - "name": "categories_parent_id_fk", - "tableFrom": "categories", - "tableTo": "categories", - "columnsFrom": ["parent_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0009_snapshot.json b/drizzle/meta/0009_snapshot.json deleted file mode 100644 index 49d0550..0000000 --- a/drizzle/meta/0009_snapshot.json +++ /dev/null @@ -1,1277 +0,0 @@ -{ - "id": "6885ca86-2577-4da3-b6dd-8b84c2267aa6", - "prevId": "f4896a3b-c827-4cc6-b7e2-86736e1d22bd", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "age_declared_at": { - "name": "age_declared_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "maturity_pref": { - "name": "maturity_pref", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_pinned": { - "name": "is_pinned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_mod_deleted": { - "name": "is_mod_deleted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "embedding": { - "name": "embedding", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_last_activity_at_idx": { - "name": "topics_last_activity_at_idx", - "columns": [ - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "embedding": { - "name": "embedding", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "reaction_set": { - "name": "reaction_set", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[\"like\"]'::jsonb" - }, - "moderation_thresholds": { - "name": "moderation_thresholds", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'{\"autoBlockReportCount\":5,\"warnThreshold\":3}'::jsonb" - }, - "word_filter": { - "name": "word_filter", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.categories": { - "name": "categories", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "categories_slug_community_did_idx": { - "name": "categories_slug_community_did_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_parent_id_idx": { - "name": "categories_parent_id_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_community_did_idx": { - "name": "categories_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_maturity_rating_idx": { - "name": "categories_maturity_rating_idx", - "columns": [ - { - "expression": "maturity_rating", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "categories_parent_id_fk": { - "name": "categories_parent_id_fk", - "tableFrom": "categories", - "tableTo": "categories", - "columnsFrom": ["parent_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_actions": { - "name": "moderation_actions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "action": { - "name": "action", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "moderator_did": { - "name": "moderator_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "mod_actions_moderator_did_idx": { - "name": "mod_actions_moderator_did_idx", - "columns": [ - { - "expression": "moderator_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_community_did_idx": { - "name": "mod_actions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_created_at_idx": { - "name": "mod_actions_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_uri_idx": { - "name": "mod_actions_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_did_idx": { - "name": "mod_actions_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reports": { - "name": "reports", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "reporter_did": { - "name": "reporter_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason_type": { - "name": "reason_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "resolution_type": { - "name": "resolution_type", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reports_reporter_did_idx": { - "name": "reports_reporter_did_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_uri_idx": { - "name": "reports_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_did_idx": { - "name": "reports_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_community_did_idx": { - "name": "reports_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_status_idx": { - "name": "reports_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_created_at_idx": { - "name": "reports_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_unique_reporter_target_idx": { - "name": "reports_unique_reporter_target_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0010_snapshot.json b/drizzle/meta/0010_snapshot.json deleted file mode 100644 index 296cc7a..0000000 --- a/drizzle/meta/0010_snapshot.json +++ /dev/null @@ -1,1265 +0,0 @@ -{ - "id": "38f94dc1-1f3f-4ecc-8d82-4e4520cff5cb", - "prevId": "6885ca86-2577-4da3-b6dd-8b84c2267aa6", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "age_declared_at": { - "name": "age_declared_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "maturity_pref": { - "name": "maturity_pref", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_pinned": { - "name": "is_pinned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_mod_deleted": { - "name": "is_mod_deleted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_last_activity_at_idx": { - "name": "topics_last_activity_at_idx", - "columns": [ - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "reaction_set": { - "name": "reaction_set", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[\"like\"]'::jsonb" - }, - "moderation_thresholds": { - "name": "moderation_thresholds", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'{\"autoBlockReportCount\":5,\"warnThreshold\":3}'::jsonb" - }, - "word_filter": { - "name": "word_filter", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.categories": { - "name": "categories", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "categories_slug_community_did_idx": { - "name": "categories_slug_community_did_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_parent_id_idx": { - "name": "categories_parent_id_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_community_did_idx": { - "name": "categories_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_maturity_rating_idx": { - "name": "categories_maturity_rating_idx", - "columns": [ - { - "expression": "maturity_rating", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "categories_parent_id_fk": { - "name": "categories_parent_id_fk", - "tableFrom": "categories", - "tableTo": "categories", - "columnsFrom": ["parent_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_actions": { - "name": "moderation_actions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "action": { - "name": "action", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "moderator_did": { - "name": "moderator_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "mod_actions_moderator_did_idx": { - "name": "mod_actions_moderator_did_idx", - "columns": [ - { - "expression": "moderator_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_community_did_idx": { - "name": "mod_actions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_created_at_idx": { - "name": "mod_actions_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_uri_idx": { - "name": "mod_actions_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_did_idx": { - "name": "mod_actions_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reports": { - "name": "reports", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "reporter_did": { - "name": "reporter_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason_type": { - "name": "reason_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "resolution_type": { - "name": "resolution_type", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reports_reporter_did_idx": { - "name": "reports_reporter_did_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_uri_idx": { - "name": "reports_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_did_idx": { - "name": "reports_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_community_did_idx": { - "name": "reports_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_status_idx": { - "name": "reports_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_created_at_idx": { - "name": "reports_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_unique_reporter_target_idx": { - "name": "reports_unique_reporter_target_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0011_snapshot.json b/drizzle/meta/0011_snapshot.json deleted file mode 100644 index 62d9e1d..0000000 --- a/drizzle/meta/0011_snapshot.json +++ /dev/null @@ -1,1380 +0,0 @@ -{ - "id": "577fe24e-9352-49cb-af6e-444ad3f0a3d7", - "prevId": "38f94dc1-1f3f-4ecc-8d82-4e4520cff5cb", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "age_declared_at": { - "name": "age_declared_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "maturity_pref": { - "name": "maturity_pref", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_pinned": { - "name": "is_pinned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_mod_deleted": { - "name": "is_mod_deleted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_last_activity_at_idx": { - "name": "topics_last_activity_at_idx", - "columns": [ - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "reaction_set": { - "name": "reaction_set", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[\"like\"]'::jsonb" - }, - "moderation_thresholds": { - "name": "moderation_thresholds", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'{\"autoBlockReportCount\":5,\"warnThreshold\":3}'::jsonb" - }, - "word_filter": { - "name": "word_filter", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.categories": { - "name": "categories", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "categories_slug_community_did_idx": { - "name": "categories_slug_community_did_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_parent_id_idx": { - "name": "categories_parent_id_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_community_did_idx": { - "name": "categories_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_maturity_rating_idx": { - "name": "categories_maturity_rating_idx", - "columns": [ - { - "expression": "maturity_rating", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "categories_parent_id_fk": { - "name": "categories_parent_id_fk", - "tableFrom": "categories", - "tableTo": "categories", - "columnsFrom": ["parent_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_actions": { - "name": "moderation_actions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "action": { - "name": "action", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "moderator_did": { - "name": "moderator_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "mod_actions_moderator_did_idx": { - "name": "mod_actions_moderator_did_idx", - "columns": [ - { - "expression": "moderator_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_community_did_idx": { - "name": "mod_actions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_created_at_idx": { - "name": "mod_actions_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_uri_idx": { - "name": "mod_actions_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_did_idx": { - "name": "mod_actions_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reports": { - "name": "reports", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "reporter_did": { - "name": "reporter_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason_type": { - "name": "reason_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "resolution_type": { - "name": "resolution_type", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reports_reporter_did_idx": { - "name": "reports_reporter_did_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_uri_idx": { - "name": "reports_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_did_idx": { - "name": "reports_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_community_did_idx": { - "name": "reports_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_status_idx": { - "name": "reports_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_created_at_idx": { - "name": "reports_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_unique_reporter_target_idx": { - "name": "reports_unique_reporter_target_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.notifications": { - "name": "notifications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "recipient_did": { - "name": "recipient_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "actor_did": { - "name": "actor_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "read": { - "name": "read", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "notifications_recipient_did_idx": { - "name": "notifications_recipient_did_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_recipient_read_idx": { - "name": "notifications_recipient_read_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "read", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_created_at_idx": { - "name": "notifications_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0012_snapshot.json b/drizzle/meta/0012_snapshot.json deleted file mode 100644 index 18cf763..0000000 --- a/drizzle/meta/0012_snapshot.json +++ /dev/null @@ -1,1552 +0,0 @@ -{ - "id": "7babb9df-a29e-46f1-9f2e-b51b983e345a", - "prevId": "577fe24e-9352-49cb-af6e-444ad3f0a3d7", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "age_declared_at": { - "name": "age_declared_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "maturity_pref": { - "name": "maturity_pref", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_pinned": { - "name": "is_pinned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_mod_deleted": { - "name": "is_mod_deleted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_last_activity_at_idx": { - "name": "topics_last_activity_at_idx", - "columns": [ - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "reaction_set": { - "name": "reaction_set", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[\"like\"]'::jsonb" - }, - "moderation_thresholds": { - "name": "moderation_thresholds", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'{\"autoBlockReportCount\":5,\"warnThreshold\":3}'::jsonb" - }, - "word_filter": { - "name": "word_filter", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.categories": { - "name": "categories", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "categories_slug_community_did_idx": { - "name": "categories_slug_community_did_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_parent_id_idx": { - "name": "categories_parent_id_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_community_did_idx": { - "name": "categories_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_maturity_rating_idx": { - "name": "categories_maturity_rating_idx", - "columns": [ - { - "expression": "maturity_rating", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "categories_parent_id_fk": { - "name": "categories_parent_id_fk", - "tableFrom": "categories", - "tableTo": "categories", - "columnsFrom": ["parent_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_actions": { - "name": "moderation_actions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "action": { - "name": "action", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "moderator_did": { - "name": "moderator_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "mod_actions_moderator_did_idx": { - "name": "mod_actions_moderator_did_idx", - "columns": [ - { - "expression": "moderator_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_community_did_idx": { - "name": "mod_actions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_created_at_idx": { - "name": "mod_actions_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_uri_idx": { - "name": "mod_actions_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_did_idx": { - "name": "mod_actions_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reports": { - "name": "reports", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "reporter_did": { - "name": "reporter_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason_type": { - "name": "reason_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "resolution_type": { - "name": "resolution_type", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reports_reporter_did_idx": { - "name": "reports_reporter_did_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_uri_idx": { - "name": "reports_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_did_idx": { - "name": "reports_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_community_did_idx": { - "name": "reports_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_status_idx": { - "name": "reports_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_created_at_idx": { - "name": "reports_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_unique_reporter_target_idx": { - "name": "reports_unique_reporter_target_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.notifications": { - "name": "notifications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "recipient_did": { - "name": "recipient_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "actor_did": { - "name": "actor_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "read": { - "name": "read", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "notifications_recipient_did_idx": { - "name": "notifications_recipient_did_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_recipient_read_idx": { - "name": "notifications_recipient_read_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "read", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_created_at_idx": { - "name": "notifications_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_community_preferences": { - "name": "user_community_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_override": { - "name": "maturity_override", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "notification_prefs": { - "name": "notification_prefs", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "user_community_prefs_did_idx": { - "name": "user_community_prefs_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "user_community_prefs_community_idx": { - "name": "user_community_prefs_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_community_preferences_did_community_did_pk": { - "name": "user_community_preferences_did_community_did_pk", - "columns": ["did", "community_did"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_preferences": { - "name": "user_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "maturity_level": { - "name": "maturity_level", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'sfw'" - }, - "age_declaration_at": { - "name": "age_declaration_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "cross_post_bluesky": { - "name": "cross_post_bluesky", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cross_post_frontpage": { - "name": "cross_post_frontpage", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0013_snapshot.json b/drizzle/meta/0013_snapshot.json deleted file mode 100644 index abc3441..0000000 --- a/drizzle/meta/0013_snapshot.json +++ /dev/null @@ -1,1576 +0,0 @@ -{ - "id": "7300b203-dbcc-44da-87af-d96e41f832e3", - "prevId": "7babb9df-a29e-46f1-9f2e-b51b983e345a", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "age_declared_at": { - "name": "age_declared_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "maturity_pref": { - "name": "maturity_pref", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_pinned": { - "name": "is_pinned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_mod_deleted": { - "name": "is_mod_deleted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_last_activity_at_idx": { - "name": "topics_last_activity_at_idx", - "columns": [ - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "reaction_set": { - "name": "reaction_set", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[\"like\"]'::jsonb" - }, - "moderation_thresholds": { - "name": "moderation_thresholds", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'{\"autoBlockReportCount\":5,\"warnThreshold\":3}'::jsonb" - }, - "word_filter": { - "name": "word_filter", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "community_description": { - "name": "community_description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_logo_url": { - "name": "community_logo_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color": { - "name": "primary_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "accent_color": { - "name": "accent_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.categories": { - "name": "categories", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "categories_slug_community_did_idx": { - "name": "categories_slug_community_did_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_parent_id_idx": { - "name": "categories_parent_id_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_community_did_idx": { - "name": "categories_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_maturity_rating_idx": { - "name": "categories_maturity_rating_idx", - "columns": [ - { - "expression": "maturity_rating", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "categories_parent_id_fk": { - "name": "categories_parent_id_fk", - "tableFrom": "categories", - "tableTo": "categories", - "columnsFrom": ["parent_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_actions": { - "name": "moderation_actions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "action": { - "name": "action", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "moderator_did": { - "name": "moderator_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "mod_actions_moderator_did_idx": { - "name": "mod_actions_moderator_did_idx", - "columns": [ - { - "expression": "moderator_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_community_did_idx": { - "name": "mod_actions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_created_at_idx": { - "name": "mod_actions_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_uri_idx": { - "name": "mod_actions_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_did_idx": { - "name": "mod_actions_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reports": { - "name": "reports", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "reporter_did": { - "name": "reporter_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason_type": { - "name": "reason_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "resolution_type": { - "name": "resolution_type", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reports_reporter_did_idx": { - "name": "reports_reporter_did_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_uri_idx": { - "name": "reports_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_did_idx": { - "name": "reports_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_community_did_idx": { - "name": "reports_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_status_idx": { - "name": "reports_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_created_at_idx": { - "name": "reports_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_unique_reporter_target_idx": { - "name": "reports_unique_reporter_target_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.notifications": { - "name": "notifications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "recipient_did": { - "name": "recipient_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "actor_did": { - "name": "actor_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "read": { - "name": "read", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "notifications_recipient_did_idx": { - "name": "notifications_recipient_did_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_recipient_read_idx": { - "name": "notifications_recipient_read_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "read", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_created_at_idx": { - "name": "notifications_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_community_preferences": { - "name": "user_community_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_override": { - "name": "maturity_override", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "notification_prefs": { - "name": "notification_prefs", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "user_community_prefs_did_idx": { - "name": "user_community_prefs_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "user_community_prefs_community_idx": { - "name": "user_community_prefs_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_community_preferences_did_community_did_pk": { - "name": "user_community_preferences_did_community_did_pk", - "columns": ["did", "community_did"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_preferences": { - "name": "user_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "maturity_level": { - "name": "maturity_level", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'sfw'" - }, - "age_declaration_at": { - "name": "age_declaration_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "cross_post_bluesky": { - "name": "cross_post_bluesky", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cross_post_frontpage": { - "name": "cross_post_frontpage", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0014_snapshot.json b/drizzle/meta/0014_snapshot.json deleted file mode 100644 index ad3a6f3..0000000 --- a/drizzle/meta/0014_snapshot.json +++ /dev/null @@ -1,1663 +0,0 @@ -{ - "id": "f1366e9b-ffb4-4ec1-b298-87c72085335b", - "prevId": "7300b203-dbcc-44da-87af-d96e41f832e3", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "age_declared_at": { - "name": "age_declared_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "maturity_pref": { - "name": "maturity_pref", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_pinned": { - "name": "is_pinned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_mod_deleted": { - "name": "is_mod_deleted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_last_activity_at_idx": { - "name": "topics_last_activity_at_idx", - "columns": [ - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "reaction_set": { - "name": "reaction_set", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[\"like\"]'::jsonb" - }, - "moderation_thresholds": { - "name": "moderation_thresholds", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'{\"autoBlockReportCount\":5,\"warnThreshold\":3}'::jsonb" - }, - "word_filter": { - "name": "word_filter", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "community_description": { - "name": "community_description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_logo_url": { - "name": "community_logo_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color": { - "name": "primary_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "accent_color": { - "name": "accent_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.categories": { - "name": "categories", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "categories_slug_community_did_idx": { - "name": "categories_slug_community_did_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_parent_id_idx": { - "name": "categories_parent_id_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_community_did_idx": { - "name": "categories_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_maturity_rating_idx": { - "name": "categories_maturity_rating_idx", - "columns": [ - { - "expression": "maturity_rating", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "categories_parent_id_fk": { - "name": "categories_parent_id_fk", - "tableFrom": "categories", - "tableTo": "categories", - "columnsFrom": ["parent_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_actions": { - "name": "moderation_actions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "action": { - "name": "action", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "moderator_did": { - "name": "moderator_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "mod_actions_moderator_did_idx": { - "name": "mod_actions_moderator_did_idx", - "columns": [ - { - "expression": "moderator_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_community_did_idx": { - "name": "mod_actions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_created_at_idx": { - "name": "mod_actions_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_uri_idx": { - "name": "mod_actions_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_did_idx": { - "name": "mod_actions_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reports": { - "name": "reports", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "reporter_did": { - "name": "reporter_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason_type": { - "name": "reason_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "resolution_type": { - "name": "resolution_type", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reports_reporter_did_idx": { - "name": "reports_reporter_did_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_uri_idx": { - "name": "reports_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_did_idx": { - "name": "reports_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_community_did_idx": { - "name": "reports_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_status_idx": { - "name": "reports_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_created_at_idx": { - "name": "reports_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_unique_reporter_target_idx": { - "name": "reports_unique_reporter_target_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.notifications": { - "name": "notifications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "recipient_did": { - "name": "recipient_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "actor_did": { - "name": "actor_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "read": { - "name": "read", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "notifications_recipient_did_idx": { - "name": "notifications_recipient_did_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_recipient_read_idx": { - "name": "notifications_recipient_read_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "read", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_created_at_idx": { - "name": "notifications_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_community_preferences": { - "name": "user_community_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_override": { - "name": "maturity_override", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "notification_prefs": { - "name": "notification_prefs", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "user_community_prefs_did_idx": { - "name": "user_community_prefs_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "user_community_prefs_community_idx": { - "name": "user_community_prefs_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_community_preferences_did_community_did_pk": { - "name": "user_community_preferences_did_community_did_pk", - "columns": ["did", "community_did"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_preferences": { - "name": "user_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "maturity_level": { - "name": "maturity_level", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'sfw'" - }, - "age_declaration_at": { - "name": "age_declaration_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "cross_post_bluesky": { - "name": "cross_post_bluesky", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cross_post_frontpage": { - "name": "cross_post_frontpage", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.cross_posts": { - "name": "cross_posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "topic_uri": { - "name": "topic_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "service": { - "name": "service", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_uri": { - "name": "cross_post_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_cid": { - "name": "cross_post_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "cross_posts_topic_uri_idx": { - "name": "cross_posts_topic_uri_idx", - "columns": [ - { - "expression": "topic_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cross_posts_author_did_idx": { - "name": "cross_posts_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0015_snapshot.json b/drizzle/meta/0015_snapshot.json deleted file mode 100644 index 2db331c..0000000 --- a/drizzle/meta/0015_snapshot.json +++ /dev/null @@ -1,1687 +0,0 @@ -{ - "id": "ad130509-a058-4428-b820-22f80b0885dc", - "prevId": "f1366e9b-ffb4-4ec1-b298-87c72085335b", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "age_declared_at": { - "name": "age_declared_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "maturity_pref": { - "name": "maturity_pref", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_pinned": { - "name": "is_pinned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_mod_deleted": { - "name": "is_mod_deleted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_last_activity_at_idx": { - "name": "topics_last_activity_at_idx", - "columns": [ - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "reaction_set": { - "name": "reaction_set", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[\"like\"]'::jsonb" - }, - "moderation_thresholds": { - "name": "moderation_thresholds", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'{\"autoBlockReportCount\":5,\"warnThreshold\":3}'::jsonb" - }, - "word_filter": { - "name": "word_filter", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "community_description": { - "name": "community_description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "service_endpoint": { - "name": "service_endpoint", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "signing_key": { - "name": "signing_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "rotation_key": { - "name": "rotation_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_logo_url": { - "name": "community_logo_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color": { - "name": "primary_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "accent_color": { - "name": "accent_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.categories": { - "name": "categories", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "categories_slug_community_did_idx": { - "name": "categories_slug_community_did_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_parent_id_idx": { - "name": "categories_parent_id_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_community_did_idx": { - "name": "categories_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_maturity_rating_idx": { - "name": "categories_maturity_rating_idx", - "columns": [ - { - "expression": "maturity_rating", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "categories_parent_id_fk": { - "name": "categories_parent_id_fk", - "tableFrom": "categories", - "tableTo": "categories", - "columnsFrom": ["parent_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_actions": { - "name": "moderation_actions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "action": { - "name": "action", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "moderator_did": { - "name": "moderator_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "mod_actions_moderator_did_idx": { - "name": "mod_actions_moderator_did_idx", - "columns": [ - { - "expression": "moderator_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_community_did_idx": { - "name": "mod_actions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_created_at_idx": { - "name": "mod_actions_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_uri_idx": { - "name": "mod_actions_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_did_idx": { - "name": "mod_actions_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reports": { - "name": "reports", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "reporter_did": { - "name": "reporter_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason_type": { - "name": "reason_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "resolution_type": { - "name": "resolution_type", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reports_reporter_did_idx": { - "name": "reports_reporter_did_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_uri_idx": { - "name": "reports_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_did_idx": { - "name": "reports_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_community_did_idx": { - "name": "reports_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_status_idx": { - "name": "reports_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_created_at_idx": { - "name": "reports_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_unique_reporter_target_idx": { - "name": "reports_unique_reporter_target_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.notifications": { - "name": "notifications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "recipient_did": { - "name": "recipient_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "actor_did": { - "name": "actor_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "read": { - "name": "read", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "notifications_recipient_did_idx": { - "name": "notifications_recipient_did_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_recipient_read_idx": { - "name": "notifications_recipient_read_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "read", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_created_at_idx": { - "name": "notifications_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_community_preferences": { - "name": "user_community_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_override": { - "name": "maturity_override", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "notification_prefs": { - "name": "notification_prefs", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "user_community_prefs_did_idx": { - "name": "user_community_prefs_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "user_community_prefs_community_idx": { - "name": "user_community_prefs_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_community_preferences_did_community_did_pk": { - "name": "user_community_preferences_did_community_did_pk", - "columns": ["did", "community_did"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_preferences": { - "name": "user_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "maturity_level": { - "name": "maturity_level", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'sfw'" - }, - "age_declaration_at": { - "name": "age_declaration_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "cross_post_bluesky": { - "name": "cross_post_bluesky", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cross_post_frontpage": { - "name": "cross_post_frontpage", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.cross_posts": { - "name": "cross_posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "topic_uri": { - "name": "topic_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "service": { - "name": "service", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_uri": { - "name": "cross_post_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_cid": { - "name": "cross_post_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "cross_posts_topic_uri_idx": { - "name": "cross_posts_topic_uri_idx", - "columns": [ - { - "expression": "topic_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cross_posts_author_did_idx": { - "name": "cross_posts_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0016_snapshot.json b/drizzle/meta/0016_snapshot.json deleted file mode 100644 index bb15ad6..0000000 --- a/drizzle/meta/0016_snapshot.json +++ /dev/null @@ -1,1707 +0,0 @@ -{ - "id": "2eccbff2-9a72-453c-8404-52da9ed2d5c3", - "prevId": "ad130509-a058-4428-b820-22f80b0885dc", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "declared_age": { - "name": "declared_age", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "maturity_pref": { - "name": "maturity_pref", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_pinned": { - "name": "is_pinned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_mod_deleted": { - "name": "is_mod_deleted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_last_activity_at_idx": { - "name": "topics_last_activity_at_idx", - "columns": [ - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "reaction_set": { - "name": "reaction_set", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[\"like\"]'::jsonb" - }, - "moderation_thresholds": { - "name": "moderation_thresholds", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'{\"autoBlockReportCount\":5,\"warnThreshold\":3}'::jsonb" - }, - "word_filter": { - "name": "word_filter", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "jurisdiction_country": { - "name": "jurisdiction_country", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "age_threshold": { - "name": "age_threshold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 16 - }, - "require_login_for_mature": { - "name": "require_login_for_mature", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": true - }, - "community_description": { - "name": "community_description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "service_endpoint": { - "name": "service_endpoint", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "signing_key": { - "name": "signing_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "rotation_key": { - "name": "rotation_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_logo_url": { - "name": "community_logo_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color": { - "name": "primary_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "accent_color": { - "name": "accent_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.categories": { - "name": "categories", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "categories_slug_community_did_idx": { - "name": "categories_slug_community_did_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_parent_id_idx": { - "name": "categories_parent_id_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_community_did_idx": { - "name": "categories_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_maturity_rating_idx": { - "name": "categories_maturity_rating_idx", - "columns": [ - { - "expression": "maturity_rating", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "categories_parent_id_fk": { - "name": "categories_parent_id_fk", - "tableFrom": "categories", - "tableTo": "categories", - "columnsFrom": ["parent_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_actions": { - "name": "moderation_actions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "action": { - "name": "action", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "moderator_did": { - "name": "moderator_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "mod_actions_moderator_did_idx": { - "name": "mod_actions_moderator_did_idx", - "columns": [ - { - "expression": "moderator_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_community_did_idx": { - "name": "mod_actions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_created_at_idx": { - "name": "mod_actions_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_uri_idx": { - "name": "mod_actions_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_did_idx": { - "name": "mod_actions_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reports": { - "name": "reports", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "reporter_did": { - "name": "reporter_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason_type": { - "name": "reason_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "resolution_type": { - "name": "resolution_type", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reports_reporter_did_idx": { - "name": "reports_reporter_did_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_uri_idx": { - "name": "reports_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_did_idx": { - "name": "reports_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_community_did_idx": { - "name": "reports_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_status_idx": { - "name": "reports_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_created_at_idx": { - "name": "reports_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_unique_reporter_target_idx": { - "name": "reports_unique_reporter_target_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.notifications": { - "name": "notifications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "recipient_did": { - "name": "recipient_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "actor_did": { - "name": "actor_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "read": { - "name": "read", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "notifications_recipient_did_idx": { - "name": "notifications_recipient_did_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_recipient_read_idx": { - "name": "notifications_recipient_read_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "read", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_created_at_idx": { - "name": "notifications_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_community_preferences": { - "name": "user_community_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_override": { - "name": "maturity_override", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "notification_prefs": { - "name": "notification_prefs", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "user_community_prefs_did_idx": { - "name": "user_community_prefs_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "user_community_prefs_community_idx": { - "name": "user_community_prefs_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_community_preferences_did_community_did_pk": { - "name": "user_community_preferences_did_community_did_pk", - "columns": ["did", "community_did"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_preferences": { - "name": "user_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "maturity_level": { - "name": "maturity_level", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'sfw'" - }, - "declared_age": { - "name": "declared_age", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "cross_post_bluesky": { - "name": "cross_post_bluesky", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cross_post_frontpage": { - "name": "cross_post_frontpage", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.cross_posts": { - "name": "cross_posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "topic_uri": { - "name": "topic_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "service": { - "name": "service", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_uri": { - "name": "cross_post_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_cid": { - "name": "cross_post_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "cross_posts_topic_uri_idx": { - "name": "cross_posts_topic_uri_idx", - "columns": [ - { - "expression": "topic_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cross_posts_author_did_idx": { - "name": "cross_posts_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0017_snapshot.json b/drizzle/meta/0017_snapshot.json deleted file mode 100644 index 42ef03e..0000000 --- a/drizzle/meta/0017_snapshot.json +++ /dev/null @@ -1,1871 +0,0 @@ -{ - "id": "88da95c5-c075-4e8f-9529-7f8c33f0cd13", - "prevId": "2eccbff2-9a72-453c-8404-52da9ed2d5c3", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "declared_age": { - "name": "declared_age", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "maturity_pref": { - "name": "maturity_pref", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_pinned": { - "name": "is_pinned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_mod_deleted": { - "name": "is_mod_deleted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_last_activity_at_idx": { - "name": "topics_last_activity_at_idx", - "columns": [ - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "reaction_set": { - "name": "reaction_set", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[\"like\"]'::jsonb" - }, - "moderation_thresholds": { - "name": "moderation_thresholds", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'{\"autoBlockReportCount\":5,\"warnThreshold\":3}'::jsonb" - }, - "word_filter": { - "name": "word_filter", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "jurisdiction_country": { - "name": "jurisdiction_country", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "age_threshold": { - "name": "age_threshold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 16 - }, - "require_login_for_mature": { - "name": "require_login_for_mature", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": true - }, - "community_description": { - "name": "community_description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "service_endpoint": { - "name": "service_endpoint", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "signing_key": { - "name": "signing_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "rotation_key": { - "name": "rotation_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_logo_url": { - "name": "community_logo_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color": { - "name": "primary_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "accent_color": { - "name": "accent_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.categories": { - "name": "categories", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "categories_slug_community_did_idx": { - "name": "categories_slug_community_did_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_parent_id_idx": { - "name": "categories_parent_id_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_community_did_idx": { - "name": "categories_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_maturity_rating_idx": { - "name": "categories_maturity_rating_idx", - "columns": [ - { - "expression": "maturity_rating", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "categories_parent_id_fk": { - "name": "categories_parent_id_fk", - "tableFrom": "categories", - "tableTo": "categories", - "columnsFrom": ["parent_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_actions": { - "name": "moderation_actions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "action": { - "name": "action", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "moderator_did": { - "name": "moderator_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "mod_actions_moderator_did_idx": { - "name": "mod_actions_moderator_did_idx", - "columns": [ - { - "expression": "moderator_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_community_did_idx": { - "name": "mod_actions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_created_at_idx": { - "name": "mod_actions_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_uri_idx": { - "name": "mod_actions_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_did_idx": { - "name": "mod_actions_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reports": { - "name": "reports", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "reporter_did": { - "name": "reporter_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason_type": { - "name": "reason_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "resolution_type": { - "name": "resolution_type", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reports_reporter_did_idx": { - "name": "reports_reporter_did_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_uri_idx": { - "name": "reports_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_did_idx": { - "name": "reports_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_community_did_idx": { - "name": "reports_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_status_idx": { - "name": "reports_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_created_at_idx": { - "name": "reports_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_unique_reporter_target_idx": { - "name": "reports_unique_reporter_target_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.notifications": { - "name": "notifications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "recipient_did": { - "name": "recipient_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "actor_did": { - "name": "actor_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "read": { - "name": "read", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "notifications_recipient_did_idx": { - "name": "notifications_recipient_did_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_recipient_read_idx": { - "name": "notifications_recipient_read_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "read", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_created_at_idx": { - "name": "notifications_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_community_preferences": { - "name": "user_community_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_override": { - "name": "maturity_override", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "notification_prefs": { - "name": "notification_prefs", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "user_community_prefs_did_idx": { - "name": "user_community_prefs_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "user_community_prefs_community_idx": { - "name": "user_community_prefs_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_community_preferences_did_community_did_pk": { - "name": "user_community_preferences_did_community_did_pk", - "columns": ["did", "community_did"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_preferences": { - "name": "user_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "maturity_level": { - "name": "maturity_level", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'sfw'" - }, - "declared_age": { - "name": "declared_age", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "cross_post_bluesky": { - "name": "cross_post_bluesky", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cross_post_frontpage": { - "name": "cross_post_frontpage", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.cross_posts": { - "name": "cross_posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "topic_uri": { - "name": "topic_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "service": { - "name": "service", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_uri": { - "name": "cross_post_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_cid": { - "name": "cross_post_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "cross_posts_topic_uri_idx": { - "name": "cross_posts_topic_uri_idx", - "columns": [ - { - "expression": "topic_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cross_posts_author_did_idx": { - "name": "cross_posts_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_onboarding_fields": { - "name": "community_onboarding_fields", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "field_type": { - "name": "field_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "label": { - "name": "label", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_mandatory": { - "name": "is_mandatory", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": true - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "config": { - "name": "config", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "onboarding_fields_community_idx": { - "name": "onboarding_fields_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_onboarding_responses": { - "name": "user_onboarding_responses", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "field_id": { - "name": "field_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "response": { - "name": "response", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "onboarding_responses_did_community_idx": { - "name": "onboarding_responses_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_onboarding_responses_did_community_did_field_id_pk": { - "name": "user_onboarding_responses_did_community_did_field_id_pk", - "columns": ["did", "community_did", "field_id"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0018_snapshot.json b/drizzle/meta/0018_snapshot.json deleted file mode 100644 index 021410e..0000000 --- a/drizzle/meta/0018_snapshot.json +++ /dev/null @@ -1,2160 +0,0 @@ -{ - "id": "46d7c0b7-8888-4a69-8a7d-c1d757704199", - "prevId": "88da95c5-c075-4e8f-9529-7f8c33f0cd13", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "declared_age": { - "name": "declared_age", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "maturity_pref": { - "name": "maturity_pref", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_pinned": { - "name": "is_pinned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_mod_deleted": { - "name": "is_mod_deleted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "moderation_status": { - "name": "moderation_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'approved'" - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_last_activity_at_idx": { - "name": "topics_last_activity_at_idx", - "columns": [ - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_moderation_status_idx": { - "name": "topics_moderation_status_idx", - "columns": [ - { - "expression": "moderation_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "moderation_status": { - "name": "moderation_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'approved'" - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_moderation_status_idx": { - "name": "replies_moderation_status_idx", - "columns": [ - { - "expression": "moderation_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "reaction_set": { - "name": "reaction_set", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[\"like\"]'::jsonb" - }, - "moderation_thresholds": { - "name": "moderation_thresholds", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'{\"autoBlockReportCount\":5,\"warnThreshold\":3,\"firstPostQueueCount\":3,\"newAccountDays\":7,\"newAccountWriteRatePerMin\":3,\"establishedWriteRatePerMin\":10,\"linkHoldEnabled\":true,\"topicCreationDelayEnabled\":true,\"burstPostCount\":5,\"burstWindowMinutes\":10,\"trustedPostThreshold\":10}'::jsonb" - }, - "word_filter": { - "name": "word_filter", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "jurisdiction_country": { - "name": "jurisdiction_country", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "age_threshold": { - "name": "age_threshold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 16 - }, - "require_login_for_mature": { - "name": "require_login_for_mature", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": true - }, - "community_description": { - "name": "community_description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "service_endpoint": { - "name": "service_endpoint", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "signing_key": { - "name": "signing_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "rotation_key": { - "name": "rotation_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_logo_url": { - "name": "community_logo_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color": { - "name": "primary_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "accent_color": { - "name": "accent_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.categories": { - "name": "categories", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "categories_slug_community_did_idx": { - "name": "categories_slug_community_did_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_parent_id_idx": { - "name": "categories_parent_id_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_community_did_idx": { - "name": "categories_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_maturity_rating_idx": { - "name": "categories_maturity_rating_idx", - "columns": [ - { - "expression": "maturity_rating", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "categories_parent_id_fk": { - "name": "categories_parent_id_fk", - "tableFrom": "categories", - "tableTo": "categories", - "columnsFrom": ["parent_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_actions": { - "name": "moderation_actions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "action": { - "name": "action", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "moderator_did": { - "name": "moderator_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "mod_actions_moderator_did_idx": { - "name": "mod_actions_moderator_did_idx", - "columns": [ - { - "expression": "moderator_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_community_did_idx": { - "name": "mod_actions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_created_at_idx": { - "name": "mod_actions_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_uri_idx": { - "name": "mod_actions_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_did_idx": { - "name": "mod_actions_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reports": { - "name": "reports", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "reporter_did": { - "name": "reporter_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason_type": { - "name": "reason_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "resolution_type": { - "name": "resolution_type", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reports_reporter_did_idx": { - "name": "reports_reporter_did_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_uri_idx": { - "name": "reports_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_did_idx": { - "name": "reports_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_community_did_idx": { - "name": "reports_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_status_idx": { - "name": "reports_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_created_at_idx": { - "name": "reports_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_unique_reporter_target_idx": { - "name": "reports_unique_reporter_target_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.notifications": { - "name": "notifications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "recipient_did": { - "name": "recipient_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "actor_did": { - "name": "actor_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "read": { - "name": "read", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "notifications_recipient_did_idx": { - "name": "notifications_recipient_did_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_recipient_read_idx": { - "name": "notifications_recipient_read_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "read", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_created_at_idx": { - "name": "notifications_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_community_preferences": { - "name": "user_community_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_override": { - "name": "maturity_override", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "notification_prefs": { - "name": "notification_prefs", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "user_community_prefs_did_idx": { - "name": "user_community_prefs_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "user_community_prefs_community_idx": { - "name": "user_community_prefs_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_community_preferences_did_community_did_pk": { - "name": "user_community_preferences_did_community_did_pk", - "columns": ["did", "community_did"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_preferences": { - "name": "user_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "maturity_level": { - "name": "maturity_level", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'sfw'" - }, - "declared_age": { - "name": "declared_age", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "cross_post_bluesky": { - "name": "cross_post_bluesky", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cross_post_frontpage": { - "name": "cross_post_frontpage", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.cross_posts": { - "name": "cross_posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "topic_uri": { - "name": "topic_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "service": { - "name": "service", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_uri": { - "name": "cross_post_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_cid": { - "name": "cross_post_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "cross_posts_topic_uri_idx": { - "name": "cross_posts_topic_uri_idx", - "columns": [ - { - "expression": "topic_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cross_posts_author_did_idx": { - "name": "cross_posts_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_onboarding_fields": { - "name": "community_onboarding_fields", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "field_type": { - "name": "field_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "label": { - "name": "label", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_mandatory": { - "name": "is_mandatory", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": true - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "config": { - "name": "config", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "onboarding_fields_community_idx": { - "name": "onboarding_fields_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_onboarding_responses": { - "name": "user_onboarding_responses", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "field_id": { - "name": "field_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "response": { - "name": "response", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "onboarding_responses_did_community_idx": { - "name": "onboarding_responses_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_onboarding_responses_did_community_did_field_id_pk": { - "name": "user_onboarding_responses_did_community_did_field_id_pk", - "columns": ["did", "community_did", "field_id"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_queue": { - "name": "moderation_queue", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "content_uri": { - "name": "content_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "queue_reason": { - "name": "queue_reason", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "matched_words": { - "name": "matched_words", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "reviewed_by": { - "name": "reviewed_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "reviewed_at": { - "name": "reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "mod_queue_author_did_idx": { - "name": "mod_queue_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_community_did_idx": { - "name": "mod_queue_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_status_idx": { - "name": "mod_queue_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_created_at_idx": { - "name": "mod_queue_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_content_uri_idx": { - "name": "mod_queue_content_uri_idx", - "columns": [ - { - "expression": "content_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.account_trust": { - "name": "account_trust", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "approved_post_count": { - "name": "approved_post_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "is_trusted": { - "name": "is_trusted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "trusted_at": { - "name": "trusted_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "account_trust_did_community_idx": { - "name": "account_trust_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_trust_did_idx": { - "name": "account_trust_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0020_snapshot.json b/drizzle/meta/0020_snapshot.json deleted file mode 100644 index 420ad31..0000000 --- a/drizzle/meta/0020_snapshot.json +++ /dev/null @@ -1,2629 +0,0 @@ -{ - "id": "eeee5762-553e-4917-9e40-38e32f941223", - "prevId": "221a3129-320c-43a0-9466-0175fbfb90c5", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "declared_age": { - "name": "declared_age", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "maturity_pref": { - "name": "maturity_pref", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "account_created_at": { - "name": "account_created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_pinned": { - "name": "is_pinned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_mod_deleted": { - "name": "is_mod_deleted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "moderation_status": { - "name": "moderation_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'approved'" - }, - "trust_status": { - "name": "trust_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'trusted'" - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_last_activity_at_idx": { - "name": "topics_last_activity_at_idx", - "columns": [ - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_moderation_status_idx": { - "name": "topics_moderation_status_idx", - "columns": [ - { - "expression": "moderation_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_trust_status_idx": { - "name": "topics_trust_status_idx", - "columns": [ - { - "expression": "trust_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "moderation_status": { - "name": "moderation_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'approved'" - }, - "trust_status": { - "name": "trust_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'trusted'" - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_moderation_status_idx": { - "name": "replies_moderation_status_idx", - "columns": [ - { - "expression": "moderation_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_trust_status_idx": { - "name": "replies_trust_status_idx", - "columns": [ - { - "expression": "trust_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "reaction_set": { - "name": "reaction_set", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[\"like\"]'::jsonb" - }, - "moderation_thresholds": { - "name": "moderation_thresholds", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'{\"autoBlockReportCount\":5,\"warnThreshold\":3,\"firstPostQueueCount\":3,\"newAccountDays\":7,\"newAccountWriteRatePerMin\":3,\"establishedWriteRatePerMin\":10,\"linkHoldEnabled\":true,\"topicCreationDelayEnabled\":true,\"burstPostCount\":5,\"burstWindowMinutes\":10,\"trustedPostThreshold\":10}'::jsonb" - }, - "word_filter": { - "name": "word_filter", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "jurisdiction_country": { - "name": "jurisdiction_country", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "age_threshold": { - "name": "age_threshold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 16 - }, - "require_login_for_mature": { - "name": "require_login_for_mature", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": true - }, - "community_description": { - "name": "community_description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "service_endpoint": { - "name": "service_endpoint", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "signing_key": { - "name": "signing_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "rotation_key": { - "name": "rotation_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_logo_url": { - "name": "community_logo_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color": { - "name": "primary_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "accent_color": { - "name": "accent_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.categories": { - "name": "categories", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "categories_slug_community_did_idx": { - "name": "categories_slug_community_did_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_parent_id_idx": { - "name": "categories_parent_id_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_community_did_idx": { - "name": "categories_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_maturity_rating_idx": { - "name": "categories_maturity_rating_idx", - "columns": [ - { - "expression": "maturity_rating", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "categories_parent_id_fk": { - "name": "categories_parent_id_fk", - "tableFrom": "categories", - "tableTo": "categories", - "columnsFrom": ["parent_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_actions": { - "name": "moderation_actions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "action": { - "name": "action", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "moderator_did": { - "name": "moderator_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "mod_actions_moderator_did_idx": { - "name": "mod_actions_moderator_did_idx", - "columns": [ - { - "expression": "moderator_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_community_did_idx": { - "name": "mod_actions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_created_at_idx": { - "name": "mod_actions_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_uri_idx": { - "name": "mod_actions_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_did_idx": { - "name": "mod_actions_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reports": { - "name": "reports", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "reporter_did": { - "name": "reporter_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason_type": { - "name": "reason_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "resolution_type": { - "name": "resolution_type", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reports_reporter_did_idx": { - "name": "reports_reporter_did_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_uri_idx": { - "name": "reports_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_did_idx": { - "name": "reports_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_community_did_idx": { - "name": "reports_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_status_idx": { - "name": "reports_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_created_at_idx": { - "name": "reports_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_unique_reporter_target_idx": { - "name": "reports_unique_reporter_target_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.notifications": { - "name": "notifications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "recipient_did": { - "name": "recipient_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "actor_did": { - "name": "actor_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "read": { - "name": "read", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "notifications_recipient_did_idx": { - "name": "notifications_recipient_did_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_recipient_read_idx": { - "name": "notifications_recipient_read_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "read", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_created_at_idx": { - "name": "notifications_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_community_preferences": { - "name": "user_community_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_override": { - "name": "maturity_override", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "notification_prefs": { - "name": "notification_prefs", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "user_community_prefs_did_idx": { - "name": "user_community_prefs_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "user_community_prefs_community_idx": { - "name": "user_community_prefs_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_community_preferences_did_community_did_pk": { - "name": "user_community_preferences_did_community_did_pk", - "columns": ["did", "community_did"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_preferences": { - "name": "user_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "maturity_level": { - "name": "maturity_level", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'sfw'" - }, - "declared_age": { - "name": "declared_age", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "cross_post_bluesky": { - "name": "cross_post_bluesky", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cross_post_frontpage": { - "name": "cross_post_frontpage", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.cross_posts": { - "name": "cross_posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "topic_uri": { - "name": "topic_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "service": { - "name": "service", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_uri": { - "name": "cross_post_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_cid": { - "name": "cross_post_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "cross_posts_topic_uri_idx": { - "name": "cross_posts_topic_uri_idx", - "columns": [ - { - "expression": "topic_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cross_posts_author_did_idx": { - "name": "cross_posts_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_onboarding_fields": { - "name": "community_onboarding_fields", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "field_type": { - "name": "field_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "label": { - "name": "label", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_mandatory": { - "name": "is_mandatory", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": true - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "config": { - "name": "config", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "onboarding_fields_community_idx": { - "name": "onboarding_fields_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_onboarding_responses": { - "name": "user_onboarding_responses", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "field_id": { - "name": "field_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "response": { - "name": "response", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "onboarding_responses_did_community_idx": { - "name": "onboarding_responses_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_onboarding_responses_did_community_did_field_id_pk": { - "name": "user_onboarding_responses_did_community_did_field_id_pk", - "columns": ["did", "community_did", "field_id"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_queue": { - "name": "moderation_queue", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "content_uri": { - "name": "content_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "queue_reason": { - "name": "queue_reason", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "matched_words": { - "name": "matched_words", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "reviewed_by": { - "name": "reviewed_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "reviewed_at": { - "name": "reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "mod_queue_author_did_idx": { - "name": "mod_queue_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_community_did_idx": { - "name": "mod_queue_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_status_idx": { - "name": "mod_queue_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_created_at_idx": { - "name": "mod_queue_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_content_uri_idx": { - "name": "mod_queue_content_uri_idx", - "columns": [ - { - "expression": "content_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.account_trust": { - "name": "account_trust", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "approved_post_count": { - "name": "approved_post_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "is_trusted": { - "name": "is_trusted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "trusted_at": { - "name": "trusted_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "account_trust_did_community_idx": { - "name": "account_trust_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_trust_did_idx": { - "name": "account_trust_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_filters": { - "name": "community_filters", - "schema": "", - "columns": { - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'active'" - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "report_count": { - "name": "report_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_reviewed_at": { - "name": "last_reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "filtered_by": { - "name": "filtered_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "community_filters_status_idx": { - "name": "community_filters_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "community_filters_admin_did_idx": { - "name": "community_filters_admin_did_idx", - "columns": [ - { - "expression": "admin_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "community_filters_updated_at_idx": { - "name": "community_filters_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.account_filters": { - "name": "account_filters", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'active'" - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "report_count": { - "name": "report_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "ban_count": { - "name": "ban_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_reviewed_at": { - "name": "last_reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "filtered_by": { - "name": "filtered_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "account_filters_did_community_idx": { - "name": "account_filters_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_did_idx": { - "name": "account_filters_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_community_did_idx": { - "name": "account_filters_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_status_idx": { - "name": "account_filters_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_updated_at_idx": { - "name": "account_filters_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.ozone_labels": { - "name": "ozone_labels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "src": { - "name": "src", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "val": { - "name": "val", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "neg": { - "name": "neg", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cts": { - "name": "cts", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "exp": { - "name": "exp", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "ozone_labels_src_uri_val_idx": { - "name": "ozone_labels_src_uri_val_idx", - "columns": [ - { - "expression": "src", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "val", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "ozone_labels_uri_idx": { - "name": "ozone_labels_uri_idx", - "columns": [ - { - "expression": "uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "ozone_labels_val_idx": { - "name": "ozone_labels_val_idx", - "columns": [ - { - "expression": "val", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "ozone_labels_indexed_at_idx": { - "name": "ozone_labels_indexed_at_idx", - "columns": [ - { - "expression": "indexed_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0021_snapshot.json b/drizzle/meta/0021_snapshot.json deleted file mode 100644 index eef65e9..0000000 --- a/drizzle/meta/0021_snapshot.json +++ /dev/null @@ -1,2648 +0,0 @@ -{ - "id": "228d1b05-6360-4fb0-b8bf-4521f66d4e52", - "prevId": "eeee5762-553e-4917-9e40-38e32f941223", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "declared_age": { - "name": "declared_age", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "maturity_pref": { - "name": "maturity_pref", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "account_created_at": { - "name": "account_created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_pinned": { - "name": "is_pinned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_mod_deleted": { - "name": "is_mod_deleted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "moderation_status": { - "name": "moderation_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'approved'" - }, - "trust_status": { - "name": "trust_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'trusted'" - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_last_activity_at_idx": { - "name": "topics_last_activity_at_idx", - "columns": [ - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_moderation_status_idx": { - "name": "topics_moderation_status_idx", - "columns": [ - { - "expression": "moderation_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_trust_status_idx": { - "name": "topics_trust_status_idx", - "columns": [ - { - "expression": "trust_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "moderation_status": { - "name": "moderation_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'approved'" - }, - "trust_status": { - "name": "trust_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'trusted'" - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_moderation_status_idx": { - "name": "replies_moderation_status_idx", - "columns": [ - { - "expression": "moderation_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_trust_status_idx": { - "name": "replies_trust_status_idx", - "columns": [ - { - "expression": "trust_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "reaction_set": { - "name": "reaction_set", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[\"like\"]'::jsonb" - }, - "moderation_thresholds": { - "name": "moderation_thresholds", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'{\"autoBlockReportCount\":5,\"warnThreshold\":3,\"firstPostQueueCount\":3,\"newAccountDays\":7,\"newAccountWriteRatePerMin\":3,\"establishedWriteRatePerMin\":10,\"linkHoldEnabled\":true,\"topicCreationDelayEnabled\":true,\"burstPostCount\":5,\"burstWindowMinutes\":10,\"trustedPostThreshold\":10}'::jsonb" - }, - "word_filter": { - "name": "word_filter", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "jurisdiction_country": { - "name": "jurisdiction_country", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "age_threshold": { - "name": "age_threshold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 16 - }, - "require_login_for_mature": { - "name": "require_login_for_mature", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": true - }, - "community_description": { - "name": "community_description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "service_endpoint": { - "name": "service_endpoint", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "signing_key": { - "name": "signing_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "rotation_key": { - "name": "rotation_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_logo_url": { - "name": "community_logo_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color": { - "name": "primary_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "accent_color": { - "name": "accent_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.categories": { - "name": "categories", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "categories_slug_community_did_idx": { - "name": "categories_slug_community_did_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_parent_id_idx": { - "name": "categories_parent_id_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_community_did_idx": { - "name": "categories_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_maturity_rating_idx": { - "name": "categories_maturity_rating_idx", - "columns": [ - { - "expression": "maturity_rating", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "categories_parent_id_fk": { - "name": "categories_parent_id_fk", - "tableFrom": "categories", - "tableTo": "categories", - "columnsFrom": ["parent_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_actions": { - "name": "moderation_actions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "action": { - "name": "action", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "moderator_did": { - "name": "moderator_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "mod_actions_moderator_did_idx": { - "name": "mod_actions_moderator_did_idx", - "columns": [ - { - "expression": "moderator_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_community_did_idx": { - "name": "mod_actions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_created_at_idx": { - "name": "mod_actions_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_uri_idx": { - "name": "mod_actions_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_did_idx": { - "name": "mod_actions_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reports": { - "name": "reports", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "reporter_did": { - "name": "reporter_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason_type": { - "name": "reason_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "resolution_type": { - "name": "resolution_type", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "appeal_reason": { - "name": "appeal_reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "appealed_at": { - "name": "appealed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "appeal_status": { - "name": "appeal_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'none'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reports_reporter_did_idx": { - "name": "reports_reporter_did_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_uri_idx": { - "name": "reports_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_did_idx": { - "name": "reports_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_community_did_idx": { - "name": "reports_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_status_idx": { - "name": "reports_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_created_at_idx": { - "name": "reports_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_unique_reporter_target_idx": { - "name": "reports_unique_reporter_target_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.notifications": { - "name": "notifications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "recipient_did": { - "name": "recipient_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "actor_did": { - "name": "actor_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "read": { - "name": "read", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "notifications_recipient_did_idx": { - "name": "notifications_recipient_did_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_recipient_read_idx": { - "name": "notifications_recipient_read_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "read", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_created_at_idx": { - "name": "notifications_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_community_preferences": { - "name": "user_community_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_override": { - "name": "maturity_override", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "notification_prefs": { - "name": "notification_prefs", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "user_community_prefs_did_idx": { - "name": "user_community_prefs_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "user_community_prefs_community_idx": { - "name": "user_community_prefs_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_community_preferences_did_community_did_pk": { - "name": "user_community_preferences_did_community_did_pk", - "columns": ["did", "community_did"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_preferences": { - "name": "user_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "maturity_level": { - "name": "maturity_level", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'sfw'" - }, - "declared_age": { - "name": "declared_age", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "cross_post_bluesky": { - "name": "cross_post_bluesky", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cross_post_frontpage": { - "name": "cross_post_frontpage", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.cross_posts": { - "name": "cross_posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "topic_uri": { - "name": "topic_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "service": { - "name": "service", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_uri": { - "name": "cross_post_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_cid": { - "name": "cross_post_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "cross_posts_topic_uri_idx": { - "name": "cross_posts_topic_uri_idx", - "columns": [ - { - "expression": "topic_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cross_posts_author_did_idx": { - "name": "cross_posts_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_onboarding_fields": { - "name": "community_onboarding_fields", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "field_type": { - "name": "field_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "label": { - "name": "label", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_mandatory": { - "name": "is_mandatory", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": true - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "config": { - "name": "config", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "onboarding_fields_community_idx": { - "name": "onboarding_fields_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_onboarding_responses": { - "name": "user_onboarding_responses", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "field_id": { - "name": "field_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "response": { - "name": "response", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "onboarding_responses_did_community_idx": { - "name": "onboarding_responses_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_onboarding_responses_did_community_did_field_id_pk": { - "name": "user_onboarding_responses_did_community_did_field_id_pk", - "columns": ["did", "community_did", "field_id"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_queue": { - "name": "moderation_queue", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "content_uri": { - "name": "content_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "queue_reason": { - "name": "queue_reason", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "matched_words": { - "name": "matched_words", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "reviewed_by": { - "name": "reviewed_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "reviewed_at": { - "name": "reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "mod_queue_author_did_idx": { - "name": "mod_queue_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_community_did_idx": { - "name": "mod_queue_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_status_idx": { - "name": "mod_queue_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_created_at_idx": { - "name": "mod_queue_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_content_uri_idx": { - "name": "mod_queue_content_uri_idx", - "columns": [ - { - "expression": "content_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.account_trust": { - "name": "account_trust", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "approved_post_count": { - "name": "approved_post_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "is_trusted": { - "name": "is_trusted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "trusted_at": { - "name": "trusted_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "account_trust_did_community_idx": { - "name": "account_trust_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_trust_did_idx": { - "name": "account_trust_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_filters": { - "name": "community_filters", - "schema": "", - "columns": { - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'active'" - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "report_count": { - "name": "report_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_reviewed_at": { - "name": "last_reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "filtered_by": { - "name": "filtered_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "community_filters_status_idx": { - "name": "community_filters_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "community_filters_admin_did_idx": { - "name": "community_filters_admin_did_idx", - "columns": [ - { - "expression": "admin_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "community_filters_updated_at_idx": { - "name": "community_filters_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.account_filters": { - "name": "account_filters", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'active'" - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "report_count": { - "name": "report_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "ban_count": { - "name": "ban_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_reviewed_at": { - "name": "last_reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "filtered_by": { - "name": "filtered_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "account_filters_did_community_idx": { - "name": "account_filters_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_did_idx": { - "name": "account_filters_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_community_did_idx": { - "name": "account_filters_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_status_idx": { - "name": "account_filters_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_updated_at_idx": { - "name": "account_filters_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.ozone_labels": { - "name": "ozone_labels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "src": { - "name": "src", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "val": { - "name": "val", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "neg": { - "name": "neg", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cts": { - "name": "cts", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "exp": { - "name": "exp", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "ozone_labels_src_uri_val_idx": { - "name": "ozone_labels_src_uri_val_idx", - "columns": [ - { - "expression": "src", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "val", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "ozone_labels_uri_idx": { - "name": "ozone_labels_uri_idx", - "columns": [ - { - "expression": "uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "ozone_labels_val_idx": { - "name": "ozone_labels_val_idx", - "columns": [ - { - "expression": "val", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "ozone_labels_indexed_at_idx": { - "name": "ozone_labels_indexed_at_idx", - "columns": [ - { - "expression": "indexed_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0022_snapshot.json b/drizzle/meta/0022_snapshot.json deleted file mode 100644 index f4f4f6e..0000000 --- a/drizzle/meta/0022_snapshot.json +++ /dev/null @@ -1,2660 +0,0 @@ -{ - "id": "9c84df71-0ae9-4534-9d7c-c16a3802ac05", - "prevId": "228d1b05-6360-4fb0-b8bf-4521f66d4e52", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "banner_url": { - "name": "banner_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "bio": { - "name": "bio", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "declared_age": { - "name": "declared_age", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "maturity_pref": { - "name": "maturity_pref", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "account_created_at": { - "name": "account_created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_pinned": { - "name": "is_pinned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_mod_deleted": { - "name": "is_mod_deleted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "moderation_status": { - "name": "moderation_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'approved'" - }, - "trust_status": { - "name": "trust_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'trusted'" - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_last_activity_at_idx": { - "name": "topics_last_activity_at_idx", - "columns": [ - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_moderation_status_idx": { - "name": "topics_moderation_status_idx", - "columns": [ - { - "expression": "moderation_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_trust_status_idx": { - "name": "topics_trust_status_idx", - "columns": [ - { - "expression": "trust_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "moderation_status": { - "name": "moderation_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'approved'" - }, - "trust_status": { - "name": "trust_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'trusted'" - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_moderation_status_idx": { - "name": "replies_moderation_status_idx", - "columns": [ - { - "expression": "moderation_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_trust_status_idx": { - "name": "replies_trust_status_idx", - "columns": [ - { - "expression": "trust_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "reaction_set": { - "name": "reaction_set", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[\"like\"]'::jsonb" - }, - "moderation_thresholds": { - "name": "moderation_thresholds", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'{\"autoBlockReportCount\":5,\"warnThreshold\":3,\"firstPostQueueCount\":3,\"newAccountDays\":7,\"newAccountWriteRatePerMin\":3,\"establishedWriteRatePerMin\":10,\"linkHoldEnabled\":true,\"topicCreationDelayEnabled\":true,\"burstPostCount\":5,\"burstWindowMinutes\":10,\"trustedPostThreshold\":10}'::jsonb" - }, - "word_filter": { - "name": "word_filter", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "jurisdiction_country": { - "name": "jurisdiction_country", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "age_threshold": { - "name": "age_threshold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 16 - }, - "require_login_for_mature": { - "name": "require_login_for_mature", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": true - }, - "community_description": { - "name": "community_description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "service_endpoint": { - "name": "service_endpoint", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "signing_key": { - "name": "signing_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "rotation_key": { - "name": "rotation_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_logo_url": { - "name": "community_logo_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color": { - "name": "primary_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "accent_color": { - "name": "accent_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.categories": { - "name": "categories", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "categories_slug_community_did_idx": { - "name": "categories_slug_community_did_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_parent_id_idx": { - "name": "categories_parent_id_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_community_did_idx": { - "name": "categories_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_maturity_rating_idx": { - "name": "categories_maturity_rating_idx", - "columns": [ - { - "expression": "maturity_rating", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "categories_parent_id_fk": { - "name": "categories_parent_id_fk", - "tableFrom": "categories", - "tableTo": "categories", - "columnsFrom": ["parent_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_actions": { - "name": "moderation_actions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "action": { - "name": "action", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "moderator_did": { - "name": "moderator_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "mod_actions_moderator_did_idx": { - "name": "mod_actions_moderator_did_idx", - "columns": [ - { - "expression": "moderator_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_community_did_idx": { - "name": "mod_actions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_created_at_idx": { - "name": "mod_actions_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_uri_idx": { - "name": "mod_actions_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_did_idx": { - "name": "mod_actions_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reports": { - "name": "reports", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "reporter_did": { - "name": "reporter_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason_type": { - "name": "reason_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "resolution_type": { - "name": "resolution_type", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "appeal_reason": { - "name": "appeal_reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "appealed_at": { - "name": "appealed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "appeal_status": { - "name": "appeal_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'none'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reports_reporter_did_idx": { - "name": "reports_reporter_did_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_uri_idx": { - "name": "reports_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_did_idx": { - "name": "reports_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_community_did_idx": { - "name": "reports_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_status_idx": { - "name": "reports_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_created_at_idx": { - "name": "reports_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_unique_reporter_target_idx": { - "name": "reports_unique_reporter_target_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.notifications": { - "name": "notifications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "recipient_did": { - "name": "recipient_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "actor_did": { - "name": "actor_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "read": { - "name": "read", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "notifications_recipient_did_idx": { - "name": "notifications_recipient_did_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_recipient_read_idx": { - "name": "notifications_recipient_read_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "read", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_created_at_idx": { - "name": "notifications_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_community_preferences": { - "name": "user_community_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_override": { - "name": "maturity_override", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "notification_prefs": { - "name": "notification_prefs", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "user_community_prefs_did_idx": { - "name": "user_community_prefs_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "user_community_prefs_community_idx": { - "name": "user_community_prefs_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_community_preferences_did_community_did_pk": { - "name": "user_community_preferences_did_community_did_pk", - "columns": ["did", "community_did"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_preferences": { - "name": "user_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "maturity_level": { - "name": "maturity_level", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'sfw'" - }, - "declared_age": { - "name": "declared_age", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "cross_post_bluesky": { - "name": "cross_post_bluesky", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cross_post_frontpage": { - "name": "cross_post_frontpage", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.cross_posts": { - "name": "cross_posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "topic_uri": { - "name": "topic_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "service": { - "name": "service", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_uri": { - "name": "cross_post_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_cid": { - "name": "cross_post_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "cross_posts_topic_uri_idx": { - "name": "cross_posts_topic_uri_idx", - "columns": [ - { - "expression": "topic_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cross_posts_author_did_idx": { - "name": "cross_posts_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_onboarding_fields": { - "name": "community_onboarding_fields", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "field_type": { - "name": "field_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "label": { - "name": "label", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_mandatory": { - "name": "is_mandatory", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": true - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "config": { - "name": "config", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "onboarding_fields_community_idx": { - "name": "onboarding_fields_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_onboarding_responses": { - "name": "user_onboarding_responses", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "field_id": { - "name": "field_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "response": { - "name": "response", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "onboarding_responses_did_community_idx": { - "name": "onboarding_responses_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_onboarding_responses_did_community_did_field_id_pk": { - "name": "user_onboarding_responses_did_community_did_field_id_pk", - "columns": ["did", "community_did", "field_id"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_queue": { - "name": "moderation_queue", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "content_uri": { - "name": "content_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "queue_reason": { - "name": "queue_reason", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "matched_words": { - "name": "matched_words", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "reviewed_by": { - "name": "reviewed_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "reviewed_at": { - "name": "reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "mod_queue_author_did_idx": { - "name": "mod_queue_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_community_did_idx": { - "name": "mod_queue_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_status_idx": { - "name": "mod_queue_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_created_at_idx": { - "name": "mod_queue_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_content_uri_idx": { - "name": "mod_queue_content_uri_idx", - "columns": [ - { - "expression": "content_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.account_trust": { - "name": "account_trust", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "approved_post_count": { - "name": "approved_post_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "is_trusted": { - "name": "is_trusted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "trusted_at": { - "name": "trusted_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "account_trust_did_community_idx": { - "name": "account_trust_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_trust_did_idx": { - "name": "account_trust_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_filters": { - "name": "community_filters", - "schema": "", - "columns": { - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'active'" - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "report_count": { - "name": "report_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_reviewed_at": { - "name": "last_reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "filtered_by": { - "name": "filtered_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "community_filters_status_idx": { - "name": "community_filters_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "community_filters_admin_did_idx": { - "name": "community_filters_admin_did_idx", - "columns": [ - { - "expression": "admin_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "community_filters_updated_at_idx": { - "name": "community_filters_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.account_filters": { - "name": "account_filters", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'active'" - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "report_count": { - "name": "report_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "ban_count": { - "name": "ban_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_reviewed_at": { - "name": "last_reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "filtered_by": { - "name": "filtered_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "account_filters_did_community_idx": { - "name": "account_filters_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_did_idx": { - "name": "account_filters_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_community_did_idx": { - "name": "account_filters_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_status_idx": { - "name": "account_filters_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_updated_at_idx": { - "name": "account_filters_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.ozone_labels": { - "name": "ozone_labels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "src": { - "name": "src", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "val": { - "name": "val", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "neg": { - "name": "neg", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cts": { - "name": "cts", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "exp": { - "name": "exp", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "ozone_labels_src_uri_val_idx": { - "name": "ozone_labels_src_uri_val_idx", - "columns": [ - { - "expression": "src", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "val", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "ozone_labels_uri_idx": { - "name": "ozone_labels_uri_idx", - "columns": [ - { - "expression": "uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "ozone_labels_val_idx": { - "name": "ozone_labels_val_idx", - "columns": [ - { - "expression": "val", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "ozone_labels_indexed_at_idx": { - "name": "ozone_labels_indexed_at_idx", - "columns": [ - { - "expression": "indexed_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0023_snapshot.json b/drizzle/meta/0023_snapshot.json deleted file mode 100644 index 8d0f60d..0000000 --- a/drizzle/meta/0023_snapshot.json +++ /dev/null @@ -1,2752 +0,0 @@ -{ - "id": "20fc077c-d9bd-4484-80e3-94794dd67cff", - "prevId": "9c84df71-0ae9-4534-9d7c-c16a3802ac05", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "banner_url": { - "name": "banner_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "bio": { - "name": "bio", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "declared_age": { - "name": "declared_age", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "maturity_pref": { - "name": "maturity_pref", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "account_created_at": { - "name": "account_created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_pinned": { - "name": "is_pinned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_mod_deleted": { - "name": "is_mod_deleted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "moderation_status": { - "name": "moderation_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'approved'" - }, - "trust_status": { - "name": "trust_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'trusted'" - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_last_activity_at_idx": { - "name": "topics_last_activity_at_idx", - "columns": [ - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_moderation_status_idx": { - "name": "topics_moderation_status_idx", - "columns": [ - { - "expression": "moderation_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_trust_status_idx": { - "name": "topics_trust_status_idx", - "columns": [ - { - "expression": "trust_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "moderation_status": { - "name": "moderation_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'approved'" - }, - "trust_status": { - "name": "trust_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'trusted'" - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_moderation_status_idx": { - "name": "replies_moderation_status_idx", - "columns": [ - { - "expression": "moderation_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_trust_status_idx": { - "name": "replies_trust_status_idx", - "columns": [ - { - "expression": "trust_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "reaction_set": { - "name": "reaction_set", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[\"like\"]'::jsonb" - }, - "moderation_thresholds": { - "name": "moderation_thresholds", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'{\"autoBlockReportCount\":5,\"warnThreshold\":3,\"firstPostQueueCount\":3,\"newAccountDays\":7,\"newAccountWriteRatePerMin\":3,\"establishedWriteRatePerMin\":10,\"linkHoldEnabled\":true,\"topicCreationDelayEnabled\":true,\"burstPostCount\":5,\"burstWindowMinutes\":10,\"trustedPostThreshold\":10}'::jsonb" - }, - "word_filter": { - "name": "word_filter", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "jurisdiction_country": { - "name": "jurisdiction_country", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "age_threshold": { - "name": "age_threshold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 16 - }, - "require_login_for_mature": { - "name": "require_login_for_mature", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": true - }, - "community_description": { - "name": "community_description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "service_endpoint": { - "name": "service_endpoint", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "signing_key": { - "name": "signing_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "rotation_key": { - "name": "rotation_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_logo_url": { - "name": "community_logo_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color": { - "name": "primary_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "accent_color": { - "name": "accent_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.categories": { - "name": "categories", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "categories_slug_community_did_idx": { - "name": "categories_slug_community_did_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_parent_id_idx": { - "name": "categories_parent_id_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_community_did_idx": { - "name": "categories_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_maturity_rating_idx": { - "name": "categories_maturity_rating_idx", - "columns": [ - { - "expression": "maturity_rating", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "categories_parent_id_fk": { - "name": "categories_parent_id_fk", - "tableFrom": "categories", - "tableTo": "categories", - "columnsFrom": ["parent_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_actions": { - "name": "moderation_actions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "action": { - "name": "action", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "moderator_did": { - "name": "moderator_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "mod_actions_moderator_did_idx": { - "name": "mod_actions_moderator_did_idx", - "columns": [ - { - "expression": "moderator_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_community_did_idx": { - "name": "mod_actions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_created_at_idx": { - "name": "mod_actions_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_uri_idx": { - "name": "mod_actions_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_did_idx": { - "name": "mod_actions_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reports": { - "name": "reports", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "reporter_did": { - "name": "reporter_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason_type": { - "name": "reason_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "resolution_type": { - "name": "resolution_type", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "appeal_reason": { - "name": "appeal_reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "appealed_at": { - "name": "appealed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "appeal_status": { - "name": "appeal_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'none'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reports_reporter_did_idx": { - "name": "reports_reporter_did_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_uri_idx": { - "name": "reports_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_did_idx": { - "name": "reports_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_community_did_idx": { - "name": "reports_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_status_idx": { - "name": "reports_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_created_at_idx": { - "name": "reports_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_unique_reporter_target_idx": { - "name": "reports_unique_reporter_target_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.notifications": { - "name": "notifications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "recipient_did": { - "name": "recipient_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "actor_did": { - "name": "actor_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "read": { - "name": "read", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "notifications_recipient_did_idx": { - "name": "notifications_recipient_did_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_recipient_read_idx": { - "name": "notifications_recipient_read_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "read", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_created_at_idx": { - "name": "notifications_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_community_preferences": { - "name": "user_community_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_override": { - "name": "maturity_override", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "notification_prefs": { - "name": "notification_prefs", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "user_community_prefs_did_idx": { - "name": "user_community_prefs_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "user_community_prefs_community_idx": { - "name": "user_community_prefs_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_community_preferences_did_community_did_pk": { - "name": "user_community_preferences_did_community_did_pk", - "columns": ["did", "community_did"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_preferences": { - "name": "user_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "maturity_level": { - "name": "maturity_level", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'sfw'" - }, - "declared_age": { - "name": "declared_age", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "cross_post_bluesky": { - "name": "cross_post_bluesky", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cross_post_frontpage": { - "name": "cross_post_frontpage", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.cross_posts": { - "name": "cross_posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "topic_uri": { - "name": "topic_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "service": { - "name": "service", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_uri": { - "name": "cross_post_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_cid": { - "name": "cross_post_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "cross_posts_topic_uri_idx": { - "name": "cross_posts_topic_uri_idx", - "columns": [ - { - "expression": "topic_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cross_posts_author_did_idx": { - "name": "cross_posts_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_onboarding_fields": { - "name": "community_onboarding_fields", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "field_type": { - "name": "field_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "label": { - "name": "label", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_mandatory": { - "name": "is_mandatory", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": true - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "config": { - "name": "config", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "onboarding_fields_community_idx": { - "name": "onboarding_fields_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_onboarding_responses": { - "name": "user_onboarding_responses", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "field_id": { - "name": "field_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "response": { - "name": "response", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "onboarding_responses_did_community_idx": { - "name": "onboarding_responses_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_onboarding_responses_did_community_did_field_id_pk": { - "name": "user_onboarding_responses_did_community_did_field_id_pk", - "columns": ["did", "community_did", "field_id"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_queue": { - "name": "moderation_queue", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "content_uri": { - "name": "content_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "queue_reason": { - "name": "queue_reason", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "matched_words": { - "name": "matched_words", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "reviewed_by": { - "name": "reviewed_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "reviewed_at": { - "name": "reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "mod_queue_author_did_idx": { - "name": "mod_queue_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_community_did_idx": { - "name": "mod_queue_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_status_idx": { - "name": "mod_queue_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_created_at_idx": { - "name": "mod_queue_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_content_uri_idx": { - "name": "mod_queue_content_uri_idx", - "columns": [ - { - "expression": "content_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.account_trust": { - "name": "account_trust", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "approved_post_count": { - "name": "approved_post_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "is_trusted": { - "name": "is_trusted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "trusted_at": { - "name": "trusted_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "account_trust_did_community_idx": { - "name": "account_trust_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_trust_did_idx": { - "name": "account_trust_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_filters": { - "name": "community_filters", - "schema": "", - "columns": { - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'active'" - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "report_count": { - "name": "report_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_reviewed_at": { - "name": "last_reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "filtered_by": { - "name": "filtered_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "community_filters_status_idx": { - "name": "community_filters_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "community_filters_admin_did_idx": { - "name": "community_filters_admin_did_idx", - "columns": [ - { - "expression": "admin_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "community_filters_updated_at_idx": { - "name": "community_filters_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.account_filters": { - "name": "account_filters", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'active'" - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "report_count": { - "name": "report_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "ban_count": { - "name": "ban_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_reviewed_at": { - "name": "last_reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "filtered_by": { - "name": "filtered_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "account_filters_did_community_idx": { - "name": "account_filters_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_did_idx": { - "name": "account_filters_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_community_did_idx": { - "name": "account_filters_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_status_idx": { - "name": "account_filters_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_updated_at_idx": { - "name": "account_filters_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.ozone_labels": { - "name": "ozone_labels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "src": { - "name": "src", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "val": { - "name": "val", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "neg": { - "name": "neg", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cts": { - "name": "cts", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "exp": { - "name": "exp", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "ozone_labels_src_uri_val_idx": { - "name": "ozone_labels_src_uri_val_idx", - "columns": [ - { - "expression": "src", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "val", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "ozone_labels_uri_idx": { - "name": "ozone_labels_uri_idx", - "columns": [ - { - "expression": "uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "ozone_labels_val_idx": { - "name": "ozone_labels_val_idx", - "columns": [ - { - "expression": "val", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "ozone_labels_indexed_at_idx": { - "name": "ozone_labels_indexed_at_idx", - "columns": [ - { - "expression": "indexed_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_profiles": { - "name": "community_profiles", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "banner_url": { - "name": "banner_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "bio": { - "name": "bio", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "community_profiles_did_idx": { - "name": "community_profiles_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "community_profiles_community_idx": { - "name": "community_profiles_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "community_profiles_did_community_did_pk": { - "name": "community_profiles_did_community_did_pk", - "columns": ["did", "community_did"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0024_snapshot.json b/drizzle/meta/0024_snapshot.json deleted file mode 100644 index 9f43a5c..0000000 --- a/drizzle/meta/0024_snapshot.json +++ /dev/null @@ -1,2759 +0,0 @@ -{ - "id": "1682a9f5-dd72-46a8-90ec-c64301068410", - "prevId": "20fc077c-d9bd-4484-80e3-94794dd67cff", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "banner_url": { - "name": "banner_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "bio": { - "name": "bio", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "declared_age": { - "name": "declared_age", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "maturity_pref": { - "name": "maturity_pref", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "account_created_at": { - "name": "account_created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_pinned": { - "name": "is_pinned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_mod_deleted": { - "name": "is_mod_deleted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "moderation_status": { - "name": "moderation_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'approved'" - }, - "trust_status": { - "name": "trust_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'trusted'" - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_last_activity_at_idx": { - "name": "topics_last_activity_at_idx", - "columns": [ - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_moderation_status_idx": { - "name": "topics_moderation_status_idx", - "columns": [ - { - "expression": "moderation_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_trust_status_idx": { - "name": "topics_trust_status_idx", - "columns": [ - { - "expression": "trust_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "moderation_status": { - "name": "moderation_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'approved'" - }, - "trust_status": { - "name": "trust_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'trusted'" - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_moderation_status_idx": { - "name": "replies_moderation_status_idx", - "columns": [ - { - "expression": "moderation_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_trust_status_idx": { - "name": "replies_trust_status_idx", - "columns": [ - { - "expression": "trust_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "reaction_set": { - "name": "reaction_set", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[\"like\"]'::jsonb" - }, - "moderation_thresholds": { - "name": "moderation_thresholds", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'{\"autoBlockReportCount\":5,\"warnThreshold\":3,\"firstPostQueueCount\":3,\"newAccountDays\":7,\"newAccountWriteRatePerMin\":3,\"establishedWriteRatePerMin\":10,\"linkHoldEnabled\":true,\"topicCreationDelayEnabled\":true,\"burstPostCount\":5,\"burstWindowMinutes\":10,\"trustedPostThreshold\":10}'::jsonb" - }, - "word_filter": { - "name": "word_filter", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "jurisdiction_country": { - "name": "jurisdiction_country", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "age_threshold": { - "name": "age_threshold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 16 - }, - "require_login_for_mature": { - "name": "require_login_for_mature", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": true - }, - "community_description": { - "name": "community_description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "service_endpoint": { - "name": "service_endpoint", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "signing_key": { - "name": "signing_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "rotation_key": { - "name": "rotation_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_logo_url": { - "name": "community_logo_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color": { - "name": "primary_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "accent_color": { - "name": "accent_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.categories": { - "name": "categories", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "categories_slug_community_did_idx": { - "name": "categories_slug_community_did_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_parent_id_idx": { - "name": "categories_parent_id_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_community_did_idx": { - "name": "categories_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_maturity_rating_idx": { - "name": "categories_maturity_rating_idx", - "columns": [ - { - "expression": "maturity_rating", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "categories_parent_id_fk": { - "name": "categories_parent_id_fk", - "tableFrom": "categories", - "tableTo": "categories", - "columnsFrom": ["parent_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_actions": { - "name": "moderation_actions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "action": { - "name": "action", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "moderator_did": { - "name": "moderator_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "mod_actions_moderator_did_idx": { - "name": "mod_actions_moderator_did_idx", - "columns": [ - { - "expression": "moderator_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_community_did_idx": { - "name": "mod_actions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_created_at_idx": { - "name": "mod_actions_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_uri_idx": { - "name": "mod_actions_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_did_idx": { - "name": "mod_actions_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reports": { - "name": "reports", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "reporter_did": { - "name": "reporter_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason_type": { - "name": "reason_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "resolution_type": { - "name": "resolution_type", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "appeal_reason": { - "name": "appeal_reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "appealed_at": { - "name": "appealed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "appeal_status": { - "name": "appeal_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'none'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reports_reporter_did_idx": { - "name": "reports_reporter_did_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_uri_idx": { - "name": "reports_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_did_idx": { - "name": "reports_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_community_did_idx": { - "name": "reports_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_status_idx": { - "name": "reports_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_created_at_idx": { - "name": "reports_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_unique_reporter_target_idx": { - "name": "reports_unique_reporter_target_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.notifications": { - "name": "notifications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "recipient_did": { - "name": "recipient_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "actor_did": { - "name": "actor_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "read": { - "name": "read", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "notifications_recipient_did_idx": { - "name": "notifications_recipient_did_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_recipient_read_idx": { - "name": "notifications_recipient_read_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "read", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_created_at_idx": { - "name": "notifications_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_community_preferences": { - "name": "user_community_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_override": { - "name": "maturity_override", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "notification_prefs": { - "name": "notification_prefs", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "user_community_prefs_did_idx": { - "name": "user_community_prefs_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "user_community_prefs_community_idx": { - "name": "user_community_prefs_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_community_preferences_did_community_did_pk": { - "name": "user_community_preferences_did_community_did_pk", - "columns": ["did", "community_did"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_preferences": { - "name": "user_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "maturity_level": { - "name": "maturity_level", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'sfw'" - }, - "declared_age": { - "name": "declared_age", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "cross_post_bluesky": { - "name": "cross_post_bluesky", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cross_post_frontpage": { - "name": "cross_post_frontpage", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cross_post_scopes_granted": { - "name": "cross_post_scopes_granted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.cross_posts": { - "name": "cross_posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "topic_uri": { - "name": "topic_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "service": { - "name": "service", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_uri": { - "name": "cross_post_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_cid": { - "name": "cross_post_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "cross_posts_topic_uri_idx": { - "name": "cross_posts_topic_uri_idx", - "columns": [ - { - "expression": "topic_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cross_posts_author_did_idx": { - "name": "cross_posts_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_onboarding_fields": { - "name": "community_onboarding_fields", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "field_type": { - "name": "field_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "label": { - "name": "label", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_mandatory": { - "name": "is_mandatory", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": true - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "config": { - "name": "config", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "onboarding_fields_community_idx": { - "name": "onboarding_fields_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_onboarding_responses": { - "name": "user_onboarding_responses", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "field_id": { - "name": "field_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "response": { - "name": "response", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "onboarding_responses_did_community_idx": { - "name": "onboarding_responses_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_onboarding_responses_did_community_did_field_id_pk": { - "name": "user_onboarding_responses_did_community_did_field_id_pk", - "columns": ["did", "community_did", "field_id"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_queue": { - "name": "moderation_queue", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "content_uri": { - "name": "content_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "queue_reason": { - "name": "queue_reason", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "matched_words": { - "name": "matched_words", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "reviewed_by": { - "name": "reviewed_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "reviewed_at": { - "name": "reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "mod_queue_author_did_idx": { - "name": "mod_queue_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_community_did_idx": { - "name": "mod_queue_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_status_idx": { - "name": "mod_queue_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_created_at_idx": { - "name": "mod_queue_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_content_uri_idx": { - "name": "mod_queue_content_uri_idx", - "columns": [ - { - "expression": "content_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.account_trust": { - "name": "account_trust", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "approved_post_count": { - "name": "approved_post_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "is_trusted": { - "name": "is_trusted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "trusted_at": { - "name": "trusted_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "account_trust_did_community_idx": { - "name": "account_trust_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_trust_did_idx": { - "name": "account_trust_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_filters": { - "name": "community_filters", - "schema": "", - "columns": { - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'active'" - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "report_count": { - "name": "report_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_reviewed_at": { - "name": "last_reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "filtered_by": { - "name": "filtered_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "community_filters_status_idx": { - "name": "community_filters_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "community_filters_admin_did_idx": { - "name": "community_filters_admin_did_idx", - "columns": [ - { - "expression": "admin_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "community_filters_updated_at_idx": { - "name": "community_filters_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.account_filters": { - "name": "account_filters", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'active'" - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "report_count": { - "name": "report_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "ban_count": { - "name": "ban_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_reviewed_at": { - "name": "last_reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "filtered_by": { - "name": "filtered_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "account_filters_did_community_idx": { - "name": "account_filters_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_did_idx": { - "name": "account_filters_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_community_did_idx": { - "name": "account_filters_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_status_idx": { - "name": "account_filters_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_updated_at_idx": { - "name": "account_filters_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.ozone_labels": { - "name": "ozone_labels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "src": { - "name": "src", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "val": { - "name": "val", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "neg": { - "name": "neg", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cts": { - "name": "cts", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "exp": { - "name": "exp", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "ozone_labels_src_uri_val_idx": { - "name": "ozone_labels_src_uri_val_idx", - "columns": [ - { - "expression": "src", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "val", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "ozone_labels_uri_idx": { - "name": "ozone_labels_uri_idx", - "columns": [ - { - "expression": "uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "ozone_labels_val_idx": { - "name": "ozone_labels_val_idx", - "columns": [ - { - "expression": "val", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "ozone_labels_indexed_at_idx": { - "name": "ozone_labels_indexed_at_idx", - "columns": [ - { - "expression": "indexed_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_profiles": { - "name": "community_profiles", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "banner_url": { - "name": "banner_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "bio": { - "name": "bio", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "community_profiles_did_idx": { - "name": "community_profiles_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "community_profiles_community_idx": { - "name": "community_profiles_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "community_profiles_did_community_did_pk": { - "name": "community_profiles_did_community_did_pk", - "columns": ["did", "community_did"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0027_snapshot.json b/drizzle/meta/0027_snapshot.json deleted file mode 100644 index c63a94a..0000000 --- a/drizzle/meta/0027_snapshot.json +++ /dev/null @@ -1,3428 +0,0 @@ -{ - "id": "829275b4-e784-45bf-a097-d689f3623cbb", - "prevId": "1682a9f5-dd72-46a8-90ec-c64301068410", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "banner_url": { - "name": "banner_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "bio": { - "name": "bio", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "declared_age": { - "name": "declared_age", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "maturity_pref": { - "name": "maturity_pref", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "account_created_at": { - "name": "account_created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "users_role_elevated_idx": { - "name": "users_role_elevated_idx", - "columns": [ - { - "expression": "role", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "where": "role IN ('moderator', 'admin')", - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_handle_idx": { - "name": "users_handle_idx", - "columns": [ - { - "expression": "handle", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_account_created_at_idx": { - "name": "users_account_created_at_idx", - "columns": [ - { - "expression": "account_created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_pinned": { - "name": "is_pinned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_mod_deleted": { - "name": "is_mod_deleted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_author_deleted": { - "name": "is_author_deleted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "moderation_status": { - "name": "moderation_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'approved'" - }, - "trust_status": { - "name": "trust_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'trusted'" - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_last_activity_at_idx": { - "name": "topics_last_activity_at_idx", - "columns": [ - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_moderation_status_idx": { - "name": "topics_moderation_status_idx", - "columns": [ - { - "expression": "moderation_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_trust_status_idx": { - "name": "topics_trust_status_idx", - "columns": [ - { - "expression": "trust_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_category_activity_idx": { - "name": "topics_community_category_activity_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_author_deleted": { - "name": "is_author_deleted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "moderation_status": { - "name": "moderation_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'approved'" - }, - "trust_status": { - "name": "trust_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'trusted'" - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_moderation_status_idx": { - "name": "replies_moderation_status_idx", - "columns": [ - { - "expression": "moderation_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_trust_status_idx": { - "name": "replies_trust_status_idx", - "columns": [ - { - "expression": "trust_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_created_at_idx": { - "name": "replies_root_uri_created_at_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_type_idx": { - "name": "reactions_subject_uri_type_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "type", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "reaction_set": { - "name": "reaction_set", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[\"like\"]'::jsonb" - }, - "moderation_thresholds": { - "name": "moderation_thresholds", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'{\"autoBlockReportCount\":5,\"warnThreshold\":3,\"firstPostQueueCount\":3,\"newAccountDays\":7,\"newAccountWriteRatePerMin\":3,\"establishedWriteRatePerMin\":10,\"linkHoldEnabled\":true,\"topicCreationDelayEnabled\":true,\"burstPostCount\":5,\"burstWindowMinutes\":10,\"trustedPostThreshold\":10}'::jsonb" - }, - "word_filter": { - "name": "word_filter", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "jurisdiction_country": { - "name": "jurisdiction_country", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "age_threshold": { - "name": "age_threshold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 16 - }, - "require_login_for_mature": { - "name": "require_login_for_mature", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": true - }, - "community_description": { - "name": "community_description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "service_endpoint": { - "name": "service_endpoint", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "signing_key": { - "name": "signing_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "rotation_key": { - "name": "rotation_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_logo_url": { - "name": "community_logo_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color": { - "name": "primary_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "accent_color": { - "name": "accent_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.categories": { - "name": "categories", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "categories_slug_community_did_idx": { - "name": "categories_slug_community_did_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_parent_id_idx": { - "name": "categories_parent_id_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_community_did_idx": { - "name": "categories_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_maturity_rating_idx": { - "name": "categories_maturity_rating_idx", - "columns": [ - { - "expression": "maturity_rating", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "categories_parent_id_fk": { - "name": "categories_parent_id_fk", - "tableFrom": "categories", - "tableTo": "categories", - "columnsFrom": ["parent_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_actions": { - "name": "moderation_actions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "action": { - "name": "action", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "moderator_did": { - "name": "moderator_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "mod_actions_moderator_did_idx": { - "name": "mod_actions_moderator_did_idx", - "columns": [ - { - "expression": "moderator_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_community_did_idx": { - "name": "mod_actions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_created_at_idx": { - "name": "mod_actions_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_uri_idx": { - "name": "mod_actions_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_did_idx": { - "name": "mod_actions_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reports": { - "name": "reports", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "reporter_did": { - "name": "reporter_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason_type": { - "name": "reason_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "resolution_type": { - "name": "resolution_type", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "appeal_reason": { - "name": "appeal_reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "appealed_at": { - "name": "appealed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "appeal_status": { - "name": "appeal_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'none'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reports_reporter_did_idx": { - "name": "reports_reporter_did_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_uri_idx": { - "name": "reports_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_did_idx": { - "name": "reports_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_community_did_idx": { - "name": "reports_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_status_idx": { - "name": "reports_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_created_at_idx": { - "name": "reports_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_unique_reporter_target_idx": { - "name": "reports_unique_reporter_target_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.notifications": { - "name": "notifications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "recipient_did": { - "name": "recipient_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "actor_did": { - "name": "actor_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "read": { - "name": "read", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "notifications_recipient_did_idx": { - "name": "notifications_recipient_did_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_recipient_read_idx": { - "name": "notifications_recipient_read_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "read", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_created_at_idx": { - "name": "notifications_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_community_preferences": { - "name": "user_community_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_override": { - "name": "maturity_override", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "notification_prefs": { - "name": "notification_prefs", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "user_community_prefs_did_idx": { - "name": "user_community_prefs_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "user_community_prefs_community_idx": { - "name": "user_community_prefs_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_community_preferences_did_community_did_pk": { - "name": "user_community_preferences_did_community_did_pk", - "columns": ["did", "community_did"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_preferences": { - "name": "user_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "maturity_level": { - "name": "maturity_level", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'sfw'" - }, - "declared_age": { - "name": "declared_age", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "cross_post_bluesky": { - "name": "cross_post_bluesky", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cross_post_frontpage": { - "name": "cross_post_frontpage", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cross_post_scopes_granted": { - "name": "cross_post_scopes_granted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.cross_posts": { - "name": "cross_posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "topic_uri": { - "name": "topic_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "service": { - "name": "service", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_uri": { - "name": "cross_post_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_cid": { - "name": "cross_post_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "cross_posts_topic_uri_idx": { - "name": "cross_posts_topic_uri_idx", - "columns": [ - { - "expression": "topic_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cross_posts_author_did_idx": { - "name": "cross_posts_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_onboarding_fields": { - "name": "community_onboarding_fields", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "field_type": { - "name": "field_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "label": { - "name": "label", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_mandatory": { - "name": "is_mandatory", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": true - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "config": { - "name": "config", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "onboarding_fields_community_idx": { - "name": "onboarding_fields_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_onboarding_responses": { - "name": "user_onboarding_responses", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "field_id": { - "name": "field_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "response": { - "name": "response", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "onboarding_responses_did_community_idx": { - "name": "onboarding_responses_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_onboarding_responses_did_community_did_field_id_pk": { - "name": "user_onboarding_responses_did_community_did_field_id_pk", - "columns": ["did", "community_did", "field_id"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_queue": { - "name": "moderation_queue", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "content_uri": { - "name": "content_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "queue_reason": { - "name": "queue_reason", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "matched_words": { - "name": "matched_words", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "reviewed_by": { - "name": "reviewed_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "reviewed_at": { - "name": "reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "mod_queue_author_did_idx": { - "name": "mod_queue_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_community_did_idx": { - "name": "mod_queue_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_status_idx": { - "name": "mod_queue_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_created_at_idx": { - "name": "mod_queue_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_content_uri_idx": { - "name": "mod_queue_content_uri_idx", - "columns": [ - { - "expression": "content_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.account_trust": { - "name": "account_trust", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "approved_post_count": { - "name": "approved_post_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "is_trusted": { - "name": "is_trusted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "trusted_at": { - "name": "trusted_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "account_trust_did_community_idx": { - "name": "account_trust_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_trust_did_idx": { - "name": "account_trust_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_filters": { - "name": "community_filters", - "schema": "", - "columns": { - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'active'" - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "report_count": { - "name": "report_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_reviewed_at": { - "name": "last_reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "filtered_by": { - "name": "filtered_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "community_filters_status_idx": { - "name": "community_filters_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "community_filters_admin_did_idx": { - "name": "community_filters_admin_did_idx", - "columns": [ - { - "expression": "admin_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "community_filters_updated_at_idx": { - "name": "community_filters_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.account_filters": { - "name": "account_filters", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'active'" - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "report_count": { - "name": "report_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "ban_count": { - "name": "ban_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_reviewed_at": { - "name": "last_reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "filtered_by": { - "name": "filtered_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "account_filters_did_community_idx": { - "name": "account_filters_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_did_idx": { - "name": "account_filters_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_community_did_idx": { - "name": "account_filters_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_status_idx": { - "name": "account_filters_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_updated_at_idx": { - "name": "account_filters_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.ozone_labels": { - "name": "ozone_labels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "src": { - "name": "src", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "val": { - "name": "val", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "neg": { - "name": "neg", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cts": { - "name": "cts", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "exp": { - "name": "exp", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "ozone_labels_src_uri_val_idx": { - "name": "ozone_labels_src_uri_val_idx", - "columns": [ - { - "expression": "src", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "val", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "ozone_labels_uri_idx": { - "name": "ozone_labels_uri_idx", - "columns": [ - { - "expression": "uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "ozone_labels_val_idx": { - "name": "ozone_labels_val_idx", - "columns": [ - { - "expression": "val", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "ozone_labels_indexed_at_idx": { - "name": "ozone_labels_indexed_at_idx", - "columns": [ - { - "expression": "indexed_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_profiles": { - "name": "community_profiles", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "banner_url": { - "name": "banner_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "bio": { - "name": "bio", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "community_profiles_did_idx": { - "name": "community_profiles_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "community_profiles_community_idx": { - "name": "community_profiles_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "community_profiles_did_community_did_pk": { - "name": "community_profiles_did_community_did_pk", - "columns": ["did", "community_did"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.interaction_graph": { - "name": "interaction_graph", - "schema": "", - "columns": { - "source_did": { - "name": "source_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_id": { - "name": "community_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "interaction_type": { - "name": "interaction_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "weight": { - "name": "weight", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "first_interaction_at": { - "name": "first_interaction_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_interaction_at": { - "name": "last_interaction_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "interaction_graph_source_target_community_idx": { - "name": "interaction_graph_source_target_community_idx", - "columns": [ - { - "expression": "source_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "interaction_graph_source_did_target_did_community_id_interaction_type_pk": { - "name": "interaction_graph_source_did_target_did_community_id_interaction_type_pk", - "columns": ["source_did", "target_did", "community_id", "interaction_type"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.trust_seeds": { - "name": "trust_seeds", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_id": { - "name": "community_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "added_by": { - "name": "added_by", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "trust_seeds_did_community_idx": { - "name": "trust_seeds_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.trust_scores": { - "name": "trust_scores", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_id": { - "name": "community_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "score": { - "name": "score", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "computed_at": { - "name": "computed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "trust_scores_did_community_idx": { - "name": "trust_scores_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "trust_scores_did_community_id_pk": { - "name": "trust_scores_did_community_id_pk", - "columns": ["did", "community_id"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.sybil_clusters": { - "name": "sybil_clusters", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "cluster_hash": { - "name": "cluster_hash", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "internal_edge_count": { - "name": "internal_edge_count", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "external_edge_count": { - "name": "external_edge_count", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "member_count": { - "name": "member_count", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'flagged'" - }, - "reviewed_by": { - "name": "reviewed_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "reviewed_at": { - "name": "reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "detected_at": { - "name": "detected_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "sybil_clusters_hash_idx": { - "name": "sybil_clusters_hash_idx", - "columns": [ - { - "expression": "cluster_hash", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.sybil_cluster_members": { - "name": "sybil_cluster_members", - "schema": "", - "columns": { - "cluster_id": { - "name": "cluster_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "role_in_cluster": { - "name": "role_in_cluster", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "joined_at": { - "name": "joined_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "sybil_cluster_members_cluster_id_sybil_clusters_id_fk": { - "name": "sybil_cluster_members_cluster_id_sybil_clusters_id_fk", - "tableFrom": "sybil_cluster_members", - "tableTo": "sybil_clusters", - "columnsFrom": ["cluster_id"], - "columnsTo": ["id"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "sybil_cluster_members_cluster_id_did_pk": { - "name": "sybil_cluster_members_cluster_id_did_pk", - "columns": ["cluster_id", "did"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.behavioral_flags": { - "name": "behavioral_flags", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "flag_type": { - "name": "flag_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "affected_dids": { - "name": "affected_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "details": { - "name": "details", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "detected_at": { - "name": "detected_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "behavioral_flags_flag_type_idx": { - "name": "behavioral_flags_flag_type_idx", - "columns": [ - { - "expression": "flag_type", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "behavioral_flags_status_idx": { - "name": "behavioral_flags_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "behavioral_flags_detected_at_idx": { - "name": "behavioral_flags_detected_at_idx", - "columns": [ - { - "expression": "detected_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.pds_trust_factors": { - "name": "pds_trust_factors", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "pds_host": { - "name": "pds_host", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "trust_factor": { - "name": "trust_factor", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "is_default": { - "name": "is_default", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "pds_trust_factors_pds_host_idx": { - "name": "pds_trust_factors_pds_host_idx", - "columns": [ - { - "expression": "pds_host", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/0028_snapshot.json b/drizzle/meta/0028_snapshot.json deleted file mode 100644 index 7e4d5a9..0000000 --- a/drizzle/meta/0028_snapshot.json +++ /dev/null @@ -1,3435 +0,0 @@ -{ - "id": "b5dc7d82-7c46-426c-b872-18df2545d589", - "prevId": "829275b4-e784-45bf-a097-d689f3623cbb", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.users": { - "name": "users", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "banner_url": { - "name": "banner_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "bio": { - "name": "bio", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "role": { - "name": "role", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'user'" - }, - "is_banned": { - "name": "is_banned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "reputation_score": { - "name": "reputation_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "first_seen_at": { - "name": "first_seen_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_active_at": { - "name": "last_active_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "declared_age": { - "name": "declared_age", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "maturity_pref": { - "name": "maturity_pref", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "account_created_at": { - "name": "account_created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "users_role_elevated_idx": { - "name": "users_role_elevated_idx", - "columns": [ - { - "expression": "role", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "where": "role IN ('moderator', 'admin')", - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_handle_idx": { - "name": "users_handle_idx", - "columns": [ - { - "expression": "handle", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "users_account_created_at_idx": { - "name": "users_account_created_at_idx", - "columns": [ - { - "expression": "account_created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.firehose_cursor": { - "name": "firehose_cursor", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "cursor": { - "name": "cursor", - "type": "bigint", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.topics": { - "name": "topics", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "category": { - "name": "category", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "tags": { - "name": "tags", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reply_count": { - "name": "reply_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_activity_at": { - "name": "last_activity_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_pinned": { - "name": "is_pinned", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_mod_deleted": { - "name": "is_mod_deleted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_author_deleted": { - "name": "is_author_deleted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "moderation_status": { - "name": "moderation_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'approved'" - }, - "trust_status": { - "name": "trust_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'trusted'" - } - }, - "indexes": { - "topics_author_did_idx": { - "name": "topics_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_category_idx": { - "name": "topics_category_idx", - "columns": [ - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_created_at_idx": { - "name": "topics_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_last_activity_at_idx": { - "name": "topics_last_activity_at_idx", - "columns": [ - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_did_idx": { - "name": "topics_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_moderation_status_idx": { - "name": "topics_moderation_status_idx", - "columns": [ - { - "expression": "moderation_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_trust_status_idx": { - "name": "topics_trust_status_idx", - "columns": [ - { - "expression": "trust_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "topics_community_category_activity_idx": { - "name": "topics_community_category_activity_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "category", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "last_activity_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.replies": { - "name": "replies", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_format": { - "name": "content_format", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "root_uri": { - "name": "root_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "root_cid": { - "name": "root_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_uri": { - "name": "parent_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "parent_cid": { - "name": "parent_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "labels": { - "name": "labels", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "reaction_count": { - "name": "reaction_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_author_deleted": { - "name": "is_author_deleted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "moderation_status": { - "name": "moderation_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'approved'" - }, - "trust_status": { - "name": "trust_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'trusted'" - }, - "is_mod_deleted": { - "name": "is_mod_deleted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "replies_author_did_idx": { - "name": "replies_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_idx": { - "name": "replies_root_uri_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_parent_uri_idx": { - "name": "replies_parent_uri_idx", - "columns": [ - { - "expression": "parent_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_created_at_idx": { - "name": "replies_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_community_did_idx": { - "name": "replies_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_moderation_status_idx": { - "name": "replies_moderation_status_idx", - "columns": [ - { - "expression": "moderation_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_trust_status_idx": { - "name": "replies_trust_status_idx", - "columns": [ - { - "expression": "trust_status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "replies_root_uri_created_at_idx": { - "name": "replies_root_uri_created_at_idx", - "columns": [ - { - "expression": "root_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reactions": { - "name": "reactions", - "schema": "", - "columns": { - "uri": { - "name": "uri", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_cid": { - "name": "subject_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reactions_author_did_idx": { - "name": "reactions_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_idx": { - "name": "reactions_subject_uri_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_community_did_idx": { - "name": "reactions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reactions_subject_uri_type_idx": { - "name": "reactions_subject_uri_type_idx", - "columns": [ - { - "expression": "subject_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "type", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "reactions_author_subject_type_uniq": { - "name": "reactions_author_subject_type_uniq", - "nullsNotDistinct": false, - "columns": ["author_did", "subject_uri", "type"] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.tracked_repos": { - "name": "tracked_repos", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "tracked_at": { - "name": "tracked_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_settings": { - "name": "community_settings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "default": "'default'" - }, - "initialized": { - "name": "initialized", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_name": { - "name": "community_name", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'Barazo Community'" - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "reaction_set": { - "name": "reaction_set", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[\"like\"]'::jsonb" - }, - "moderation_thresholds": { - "name": "moderation_thresholds", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'{\"autoBlockReportCount\":5,\"warnThreshold\":3,\"firstPostQueueCount\":3,\"newAccountDays\":7,\"newAccountWriteRatePerMin\":3,\"establishedWriteRatePerMin\":10,\"linkHoldEnabled\":true,\"topicCreationDelayEnabled\":true,\"burstPostCount\":5,\"burstWindowMinutes\":10,\"trustedPostThreshold\":10}'::jsonb" - }, - "word_filter": { - "name": "word_filter", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "jurisdiction_country": { - "name": "jurisdiction_country", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "age_threshold": { - "name": "age_threshold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 16 - }, - "require_login_for_mature": { - "name": "require_login_for_mature", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": true - }, - "community_description": { - "name": "community_description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "handle": { - "name": "handle", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "service_endpoint": { - "name": "service_endpoint", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "signing_key": { - "name": "signing_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "rotation_key": { - "name": "rotation_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_logo_url": { - "name": "community_logo_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color": { - "name": "primary_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "accent_color": { - "name": "accent_color", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.categories": { - "name": "categories", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "slug": { - "name": "slug", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "parent_id": { - "name": "parent_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_rating": { - "name": "maturity_rating", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'safe'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "categories_slug_community_did_idx": { - "name": "categories_slug_community_did_idx", - "columns": [ - { - "expression": "slug", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_parent_id_idx": { - "name": "categories_parent_id_idx", - "columns": [ - { - "expression": "parent_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_community_did_idx": { - "name": "categories_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "categories_maturity_rating_idx": { - "name": "categories_maturity_rating_idx", - "columns": [ - { - "expression": "maturity_rating", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "categories_parent_id_fk": { - "name": "categories_parent_id_fk", - "tableFrom": "categories", - "tableTo": "categories", - "columnsFrom": ["parent_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_actions": { - "name": "moderation_actions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "action": { - "name": "action", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "moderator_did": { - "name": "moderator_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "mod_actions_moderator_did_idx": { - "name": "mod_actions_moderator_did_idx", - "columns": [ - { - "expression": "moderator_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_community_did_idx": { - "name": "mod_actions_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_created_at_idx": { - "name": "mod_actions_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_uri_idx": { - "name": "mod_actions_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_actions_target_did_idx": { - "name": "mod_actions_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.reports": { - "name": "reports", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "reporter_did": { - "name": "reporter_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_uri": { - "name": "target_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason_type": { - "name": "reason_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "resolution_type": { - "name": "resolution_type", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_by": { - "name": "resolved_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "resolved_at": { - "name": "resolved_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "appeal_reason": { - "name": "appeal_reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "appealed_at": { - "name": "appealed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "appeal_status": { - "name": "appeal_status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'none'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "reports_reporter_did_idx": { - "name": "reports_reporter_did_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_uri_idx": { - "name": "reports_target_uri_idx", - "columns": [ - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_target_did_idx": { - "name": "reports_target_did_idx", - "columns": [ - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_community_did_idx": { - "name": "reports_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_status_idx": { - "name": "reports_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_created_at_idx": { - "name": "reports_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "reports_unique_reporter_target_idx": { - "name": "reports_unique_reporter_target_idx", - "columns": [ - { - "expression": "reporter_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "target_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.notifications": { - "name": "notifications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "recipient_did": { - "name": "recipient_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "subject_uri": { - "name": "subject_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "actor_did": { - "name": "actor_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "read": { - "name": "read", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "notifications_recipient_did_idx": { - "name": "notifications_recipient_did_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_recipient_read_idx": { - "name": "notifications_recipient_read_idx", - "columns": [ - { - "expression": "recipient_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "read", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "notifications_created_at_idx": { - "name": "notifications_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_community_preferences": { - "name": "user_community_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "maturity_override": { - "name": "maturity_override", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "notification_prefs": { - "name": "notification_prefs", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "user_community_prefs_did_idx": { - "name": "user_community_prefs_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "user_community_prefs_community_idx": { - "name": "user_community_prefs_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_community_preferences_did_community_did_pk": { - "name": "user_community_preferences_did_community_did_pk", - "columns": ["did", "community_did"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_preferences": { - "name": "user_preferences", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "maturity_level": { - "name": "maturity_level", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'sfw'" - }, - "declared_age": { - "name": "declared_age", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "muted_words": { - "name": "muted_words", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "blocked_dids": { - "name": "blocked_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "muted_dids": { - "name": "muted_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true, - "default": "'[]'::jsonb" - }, - "cross_post_bluesky": { - "name": "cross_post_bluesky", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cross_post_frontpage": { - "name": "cross_post_frontpage", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cross_post_scopes_granted": { - "name": "cross_post_scopes_granted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.cross_posts": { - "name": "cross_posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "topic_uri": { - "name": "topic_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "service": { - "name": "service", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_uri": { - "name": "cross_post_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cross_post_cid": { - "name": "cross_post_cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "cross_posts_topic_uri_idx": { - "name": "cross_posts_topic_uri_idx", - "columns": [ - { - "expression": "topic_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cross_posts_author_did_idx": { - "name": "cross_posts_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_onboarding_fields": { - "name": "community_onboarding_fields", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "field_type": { - "name": "field_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "label": { - "name": "label", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_mandatory": { - "name": "is_mandatory", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": true - }, - "sort_order": { - "name": "sort_order", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "config": { - "name": "config", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "onboarding_fields_community_idx": { - "name": "onboarding_fields_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.user_onboarding_responses": { - "name": "user_onboarding_responses", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "field_id": { - "name": "field_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "response": { - "name": "response", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "completed_at": { - "name": "completed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "onboarding_responses_did_community_idx": { - "name": "onboarding_responses_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "user_onboarding_responses_did_community_did_field_id_pk": { - "name": "user_onboarding_responses_did_community_did_field_id_pk", - "columns": ["did", "community_did", "field_id"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.moderation_queue": { - "name": "moderation_queue", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "content_uri": { - "name": "content_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "queue_reason": { - "name": "queue_reason", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "matched_words": { - "name": "matched_words", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "reviewed_by": { - "name": "reviewed_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "reviewed_at": { - "name": "reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "mod_queue_author_did_idx": { - "name": "mod_queue_author_did_idx", - "columns": [ - { - "expression": "author_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_community_did_idx": { - "name": "mod_queue_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_status_idx": { - "name": "mod_queue_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_created_at_idx": { - "name": "mod_queue_created_at_idx", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "mod_queue_content_uri_idx": { - "name": "mod_queue_content_uri_idx", - "columns": [ - { - "expression": "content_uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.account_trust": { - "name": "account_trust", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "approved_post_count": { - "name": "approved_post_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "is_trusted": { - "name": "is_trusted", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "trusted_at": { - "name": "trusted_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "account_trust_did_community_idx": { - "name": "account_trust_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_trust_did_idx": { - "name": "account_trust_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_filters": { - "name": "community_filters", - "schema": "", - "columns": { - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'active'" - }, - "admin_did": { - "name": "admin_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "report_count": { - "name": "report_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_reviewed_at": { - "name": "last_reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "filtered_by": { - "name": "filtered_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "community_filters_status_idx": { - "name": "community_filters_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "community_filters_admin_did_idx": { - "name": "community_filters_admin_did_idx", - "columns": [ - { - "expression": "admin_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "community_filters_updated_at_idx": { - "name": "community_filters_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.account_filters": { - "name": "account_filters", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'active'" - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "report_count": { - "name": "report_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "ban_count": { - "name": "ban_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_reviewed_at": { - "name": "last_reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "filtered_by": { - "name": "filtered_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "account_filters_did_community_idx": { - "name": "account_filters_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_did_idx": { - "name": "account_filters_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_community_did_idx": { - "name": "account_filters_community_did_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_status_idx": { - "name": "account_filters_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "account_filters_updated_at_idx": { - "name": "account_filters_updated_at_idx", - "columns": [ - { - "expression": "updated_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.ozone_labels": { - "name": "ozone_labels", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "src": { - "name": "src", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "val": { - "name": "val", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "neg": { - "name": "neg", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "cts": { - "name": "cts", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - }, - "exp": { - "name": "exp", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "indexed_at": { - "name": "indexed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "ozone_labels_src_uri_val_idx": { - "name": "ozone_labels_src_uri_val_idx", - "columns": [ - { - "expression": "src", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "uri", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "val", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - }, - "ozone_labels_uri_idx": { - "name": "ozone_labels_uri_idx", - "columns": [ - { - "expression": "uri", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "ozone_labels_val_idx": { - "name": "ozone_labels_val_idx", - "columns": [ - { - "expression": "val", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "ozone_labels_indexed_at_idx": { - "name": "ozone_labels_indexed_at_idx", - "columns": [ - { - "expression": "indexed_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.community_profiles": { - "name": "community_profiles", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "avatar_url": { - "name": "avatar_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "banner_url": { - "name": "banner_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "bio": { - "name": "bio", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "community_profiles_did_idx": { - "name": "community_profiles_did_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "community_profiles_community_idx": { - "name": "community_profiles_community_idx", - "columns": [ - { - "expression": "community_did", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "community_profiles_did_community_did_pk": { - "name": "community_profiles_did_community_did_pk", - "columns": ["did", "community_did"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.interaction_graph": { - "name": "interaction_graph", - "schema": "", - "columns": { - "source_did": { - "name": "source_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "target_did": { - "name": "target_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_id": { - "name": "community_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "interaction_type": { - "name": "interaction_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "weight": { - "name": "weight", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "first_interaction_at": { - "name": "first_interaction_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_interaction_at": { - "name": "last_interaction_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "interaction_graph_source_target_community_idx": { - "name": "interaction_graph_source_target_community_idx", - "columns": [ - { - "expression": "source_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "target_did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "interaction_graph_source_did_target_did_community_id_interaction_type_pk": { - "name": "interaction_graph_source_did_target_did_community_id_interaction_type_pk", - "columns": ["source_did", "target_did", "community_id", "interaction_type"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.trust_seeds": { - "name": "trust_seeds", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_id": { - "name": "community_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "added_by": { - "name": "added_by", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "reason": { - "name": "reason", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "trust_seeds_did_community_idx": { - "name": "trust_seeds_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.trust_scores": { - "name": "trust_scores", - "schema": "", - "columns": { - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_id": { - "name": "community_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "score": { - "name": "score", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "computed_at": { - "name": "computed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "trust_scores_did_community_idx": { - "name": "trust_scores_did_community_idx", - "columns": [ - { - "expression": "did", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "community_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": { - "trust_scores_did_community_id_pk": { - "name": "trust_scores_did_community_id_pk", - "columns": ["did", "community_id"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.sybil_clusters": { - "name": "sybil_clusters", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "cluster_hash": { - "name": "cluster_hash", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "internal_edge_count": { - "name": "internal_edge_count", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "external_edge_count": { - "name": "external_edge_count", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "member_count": { - "name": "member_count", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'flagged'" - }, - "reviewed_by": { - "name": "reviewed_by", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "reviewed_at": { - "name": "reviewed_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "detected_at": { - "name": "detected_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "sybil_clusters_hash_idx": { - "name": "sybil_clusters_hash_idx", - "columns": [ - { - "expression": "cluster_hash", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.sybil_cluster_members": { - "name": "sybil_cluster_members", - "schema": "", - "columns": { - "cluster_id": { - "name": "cluster_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "role_in_cluster": { - "name": "role_in_cluster", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "joined_at": { - "name": "joined_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "sybil_cluster_members_cluster_id_sybil_clusters_id_fk": { - "name": "sybil_cluster_members_cluster_id_sybil_clusters_id_fk", - "tableFrom": "sybil_cluster_members", - "tableTo": "sybil_clusters", - "columnsFrom": ["cluster_id"], - "columnsTo": ["id"], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "sybil_cluster_members_cluster_id_did_pk": { - "name": "sybil_cluster_members_cluster_id_did_pk", - "columns": ["cluster_id", "did"] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.behavioral_flags": { - "name": "behavioral_flags", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "flag_type": { - "name": "flag_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "affected_dids": { - "name": "affected_dids", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "details": { - "name": "details", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "community_did": { - "name": "community_did", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "status": { - "name": "status", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'pending'" - }, - "detected_at": { - "name": "detected_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "behavioral_flags_flag_type_idx": { - "name": "behavioral_flags_flag_type_idx", - "columns": [ - { - "expression": "flag_type", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "behavioral_flags_status_idx": { - "name": "behavioral_flags_status_idx", - "columns": [ - { - "expression": "status", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "behavioral_flags_detected_at_idx": { - "name": "behavioral_flags_detected_at_idx", - "columns": [ - { - "expression": "detected_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "public.pds_trust_factors": { - "name": "pds_trust_factors", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "pds_host": { - "name": "pds_host", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "trust_factor": { - "name": "trust_factor", - "type": "real", - "primaryKey": false, - "notNull": true - }, - "is_default": { - "name": "is_default", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "pds_trust_factors_pds_host_idx": { - "name": "pds_trust_factors_pds_host_idx", - "columns": [ - { - "expression": "pds_host", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": true, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json index 5644908..c6dde7c 100644 --- a/drizzle/meta/_journal.json +++ b/drizzle/meta/_journal.json @@ -5,225 +5,8 @@ { "idx": 0, "version": "7", - "when": 1770940615311, - "tag": "0000_new_ink", - "breakpoints": true - }, - { - "idx": 1, - "version": "7", - "when": 1770943431138, - "tag": "0001_aromatic_whirlwind", - "breakpoints": true - }, - { - "idx": 2, - "version": "7", - "when": 1770946674704, - "tag": "0002_illegal_red_skull", - "breakpoints": true - }, - { - "idx": 3, - "version": "7", - "when": 1770966988954, - "tag": "0003_flowery_wilson_fisk", - "breakpoints": true - }, - { - "idx": 4, - "version": "7", - "when": 1771000979854, - "tag": "0004_petite_steve_rogers", - "breakpoints": true - }, - { - "idx": 5, - "version": "7", - "when": 1771007702170, - "tag": "0005_silly_smasher", - "breakpoints": true - }, - { - "idx": 6, - "version": "7", - "when": 1771008541415, - "tag": "0006_absent_domino", - "breakpoints": true - }, - { - "idx": 7, - "version": "7", - "when": 1771020576514, - "tag": "0007_boring_killmonger", - "breakpoints": true - }, - { - "idx": 8, - "version": "7", - "when": 1771032569622, - "tag": "0008_exotic_korg", - "breakpoints": true - }, - { - "idx": 9, - "version": "7", - "when": 1771036272209, - "tag": "0009_chemical_dakota_north", - "breakpoints": true - }, - { - "idx": 10, - "version": "7", - "when": 1771036752885, - "tag": "0010_dear_phil_sheldon", - "breakpoints": true - }, - { - "idx": 11, - "version": "7", - "when": 1771037848181, - "tag": "0011_fresh_veda", - "breakpoints": true - }, - { - "idx": 12, - "version": "7", - "when": 1771038512722, - "tag": "0012_swift_tony_stark", - "breakpoints": true - }, - { - "idx": 13, - "version": "7", - "when": 1771039303672, - "tag": "0013_rapid_deathstrike", - "breakpoints": true - }, - { - "idx": 14, - "version": "7", - "when": 1771039690434, - "tag": "0014_easy_the_leader", - "breakpoints": true - }, - { - "idx": 15, - "version": "7", - "when": 1771040386593, - "tag": "0015_fixed_sunset_bain", - "breakpoints": true - }, - { - "idx": 16, - "version": "7", - "when": 1771148150484, - "tag": "0016_curved_lake", - "breakpoints": true - }, - { - "idx": 17, - "version": "7", - "when": 1771151983300, - "tag": "0017_empty_leper_queen", - "breakpoints": true - }, - { - "idx": 18, - "version": "7", - "when": 1771195295640, - "tag": "0018_shocking_pet_avengers", - "breakpoints": true - }, - { - "idx": 19, - "version": "7", - "when": 1771197644627, - "tag": "0019_account_age_trust", - "breakpoints": true - }, - { - "idx": 20, - "version": "7", - "when": 1771197672050, - "tag": "0020_colorful_night_thrasher", - "breakpoints": true - }, - { - "idx": 21, - "version": "7", - "when": 1771225995702, - "tag": "0021_mute_night_thrasher", - "breakpoints": true - }, - { - "idx": 22, - "version": "7", - "when": 1771259245396, - "tag": "0022_workable_ezekiel", - "breakpoints": true - }, - { - "idx": 23, - "version": "7", - "when": 1771259311830, - "tag": "0023_flimsy_donald_blake", - "breakpoints": true - }, - { - "idx": 24, - "version": "7", - "when": 1771280352200, - "tag": "0024_grey_skreet", - "breakpoints": true - }, - { - "idx": 25, - "version": "7", - "when": 1771459200000, - "tag": "0025_author_soft_delete", - "breakpoints": true - }, - { - "idx": 26, - "version": "7", - "when": 1771459200001, - "tag": "0026_composite_indexes", - "breakpoints": true - }, - { - "idx": 27, - "version": "7", - "when": 1771619013359, - "tag": "0027_sad_spencer_smythe", - "breakpoints": true - }, - { - "idx": 28, - "version": "7", - "when": 1771624800000, - "tag": "0028_reply_mod_deleted", - "breakpoints": true - }, - { - "idx": 29, - "version": "7", - "when": 1771790400000, - "tag": "0029_vote_system", - "breakpoints": true - }, - { - "idx": 30, - "version": "7", - "when": 1771876800000, - "tag": "0030_atproto_profile_stats", - "breakpoints": true - }, - { - "idx": 31, - "version": "7", - "when": 1772265600000, - "tag": "0031_atproto_labels", + "when": 1772367640029, + "tag": "0000_baseline", "breakpoints": true } ] diff --git a/package.json b/package.json index f53ffaf..792175c 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,8 @@ "test:watch": "vitest", "test:coverage": "vitest run --coverage", "test:integration": "vitest run --config vitest.config.integration.ts", - "db:generate": "drizzle-kit generate", - "db:migrate": "drizzle-kit migrate", + "db:generate": "node --import tsx node_modules/drizzle-kit/bin.cjs generate", + "db:migrate": "tsx scripts/migrate.ts", "db:studio": "drizzle-kit studio", "format": "prettier --write .", "format:check": "prettier --check .", diff --git a/scripts/migrate.ts b/scripts/migrate.ts new file mode 100644 index 0000000..a1bebe1 --- /dev/null +++ b/scripts/migrate.ts @@ -0,0 +1,20 @@ +/* eslint-disable no-console -- CLI script, console is appropriate */ +import { runMigrations } from '../src/db/index.js' + +const databaseUrl = process.env['DATABASE_URL'] +if (!databaseUrl) { + console.error('DATABASE_URL environment variable is required') + process.exit(1) +} + +const migrationsFolder = new URL('../drizzle', import.meta.url).pathname + +try { + await runMigrations(databaseUrl, migrationsFolder) + console.log('Migrations applied successfully') +} catch (error) { + console.error('Migration failed:', error) + process.exit(1) +} + +process.exit(0) diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 668f969..ec6ce97 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -1,5 +1,5 @@ { "extends": "./tsconfig.json", - "include": ["src", "tests"], + "include": ["src", "tests", "scripts"], "exclude": ["node_modules", "dist"] }