{ "id": "8076c5e0-2476-448f-9cb4-5c201a2933a8", "prevId": "11566eae-6403-4a34-a1c5-36c4eb00cb0b", "version": "7", "dialect": "postgresql", "tables": { "public.audit_lighthouse_results": { "name": "audit_lighthouse_results", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "audit_id": { "name": "audit_id", "type": "text", "primaryKey": false, "notNull": true }, "page_id": { "name": "page_id", "type": "text", "primaryKey": false, "notNull": true }, "strategy": { "name": "strategy", "type": "text", "primaryKey": false, "notNull": true }, "performance_score": { "name": "performance_score", "type": "integer", "primaryKey": false, "notNull": false }, "accessibility_score": { "name": "accessibility_score", "type": "integer", "primaryKey": false, "notNull": false }, "best_practices_score": { "name": "best_practices_score", "type": "integer", "primaryKey": false, "notNull": false }, "seo_score": { "name": "seo_score", "type": "integer", "primaryKey": false, "notNull": false }, "lcp_ms": { "name": "lcp_ms", "type": "real", "primaryKey": false, "notNull": false }, "cls": { "name": "cls", "type": "real", "primaryKey": false, "notNull": false }, "inp_ms": { "name": "inp_ms", "type": "real", "primaryKey": false, "notNull": false }, "ttfb_ms": { "name": "ttfb_ms", "type": "real", "primaryKey": false, "notNull": false }, "error_message": { "name": "error_message", "type": "text", "primaryKey": false, "notNull": false }, "r2_key": { "name": "r2_key", "type": "text", "primaryKey": false, "notNull": false }, "payload_size_bytes": { "name": "payload_size_bytes", "type": "integer", "primaryKey": false, "notNull": false } }, "indexes": { "audit_lighthouse_results_audit_id_idx": { "name": "audit_lighthouse_results_audit_id_idx", "columns": [ { "expression": "audit_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "audit_lighthouse_results_audit_id_audits_id_fk": { "name": "audit_lighthouse_results_audit_id_audits_id_fk", "tableFrom": "audit_lighthouse_results", "tableTo": "audits", "columnsFrom": [ "audit_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "audit_lighthouse_results_page_id_audit_pages_id_fk": { "name": "audit_lighthouse_results_page_id_audit_pages_id_fk", "tableFrom": "audit_lighthouse_results", "tableTo": "audit_pages", "columnsFrom": [ "page_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.audit_pages": { "name": "audit_pages", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "audit_id": { "name": "audit_id", "type": "text", "primaryKey": false, "notNull": true }, "url": { "name": "url", "type": "text", "primaryKey": false, "notNull": true }, "status_code": { "name": "status_code", "type": "integer", "primaryKey": false, "notNull": false }, "redirect_url": { "name": "redirect_url", "type": "text", "primaryKey": false, "notNull": false }, "title": { "name": "title", "type": "text", "primaryKey": false, "notNull": false }, "meta_description": { "name": "meta_description", "type": "text", "primaryKey": false, "notNull": false }, "canonical_url": { "name": "canonical_url", "type": "text", "primaryKey": false, "notNull": false }, "robots_meta": { "name": "robots_meta", "type": "text", "primaryKey": false, "notNull": false }, "og_title": { "name": "og_title", "type": "text", "primaryKey": false, "notNull": false }, "og_description": { "name": "og_description", "type": "text", "primaryKey": false, "notNull": false }, "og_image": { "name": "og_image", "type": "text", "primaryKey": false, "notNull": false }, "h1_count": { "name": "h1_count", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "h2_count": { "name": "h2_count", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "h3_count": { "name": "h3_count", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "h4_count": { "name": "h4_count", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "h5_count": { "name": "h5_count", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "h6_count": { "name": "h6_count", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "heading_order_json": { "name": "heading_order_json", "type": "text", "primaryKey": false, "notNull": false }, "word_count": { "name": "word_count", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "images_total": { "name": "images_total", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "images_missing_alt": { "name": "images_missing_alt", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "images_json": { "name": "images_json", "type": "text", "primaryKey": false, "notNull": false }, "internal_link_count": { "name": "internal_link_count", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "external_link_count": { "name": "external_link_count", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "has_structured_data": { "name": "has_structured_data", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "hreflang_tags_json": { "name": "hreflang_tags_json", "type": "text", "primaryKey": false, "notNull": false }, "is_indexable": { "name": "is_indexable", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "response_time_ms": { "name": "response_time_ms", "type": "integer", "primaryKey": false, "notNull": false } }, "indexes": { "audit_pages_audit_id_idx": { "name": "audit_pages_audit_id_idx", "columns": [ { "expression": "audit_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "audit_pages_audit_id_audits_id_fk": { "name": "audit_pages_audit_id_audits_id_fk", "tableFrom": "audit_pages", "tableTo": "audits", "columnsFrom": [ "audit_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.audits": { "name": "audits", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "project_id": { "name": "project_id", "type": "text", "primaryKey": false, "notNull": true }, "started_by_user_id": { "name": "started_by_user_id", "type": "text", "primaryKey": false, "notNull": true }, "start_url": { "name": "start_url", "type": "text", "primaryKey": false, "notNull": true }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true, "default": "'running'" }, "workflow_instance_id": { "name": "workflow_instance_id", "type": "text", "primaryKey": false, "notNull": false }, "config": { "name": "config", "type": "text", "primaryKey": false, "notNull": true, "default": "'{}'" }, "pages_crawled": { "name": "pages_crawled", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "pages_total": { "name": "pages_total", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "lighthouse_total": { "name": "lighthouse_total", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "lighthouse_completed": { "name": "lighthouse_completed", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "lighthouse_failed": { "name": "lighthouse_failed", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "current_phase": { "name": "current_phase", "type": "text", "primaryKey": false, "notNull": false, "default": "'discovery'" }, "started_at": { "name": "started_at", "type": "text", "primaryKey": false, "notNull": true, "default": "to_char(now() AT TIME ZONE 'utc', 'YYYY-MM-DD\"T\"HH24:MI:SS.MS\"Z\"')" }, "completed_at": { "name": "completed_at", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": { "audits_project_id_idx": { "name": "audits_project_id_idx", "columns": [ { "expression": "project_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "audits_started_by_user_id_idx": { "name": "audits_started_by_user_id_idx", "columns": [ { "expression": "started_by_user_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "audits_project_id_projects_id_fk": { "name": "audits_project_id_projects_id_fk", "tableFrom": "audits", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.keyword_metrics": { "name": "keyword_metrics", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "project_id": { "name": "project_id", "type": "text", "primaryKey": false, "notNull": true }, "keyword": { "name": "keyword", "type": "text", "primaryKey": false, "notNull": true }, "location_code": { "name": "location_code", "type": "integer", "primaryKey": false, "notNull": true }, "language_code": { "name": "language_code", "type": "text", "primaryKey": false, "notNull": true, "default": "'en'" }, "search_volume": { "name": "search_volume", "type": "integer", "primaryKey": false, "notNull": false }, "cpc": { "name": "cpc", "type": "real", "primaryKey": false, "notNull": false }, "competition": { "name": "competition", "type": "real", "primaryKey": false, "notNull": false }, "keyword_difficulty": { "name": "keyword_difficulty", "type": "integer", "primaryKey": false, "notNull": false }, "intent": { "name": "intent", "type": "text", "primaryKey": false, "notNull": false }, "monthly_searches": { "name": "monthly_searches", "type": "text", "primaryKey": false, "notNull": false }, "fetched_at": { "name": "fetched_at", "type": "text", "primaryKey": false, "notNull": true, "default": "to_char(now() AT TIME ZONE 'utc', 'YYYY-MM-DD\"T\"HH24:MI:SS.MS\"Z\"')" } }, "indexes": { "keyword_metrics_unique_project_keyword_location_language": { "name": "keyword_metrics_unique_project_keyword_location_language", "columns": [ { "expression": "project_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "keyword", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "location_code", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "language_code", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} }, "keyword_metrics_lookup_idx": { "name": "keyword_metrics_lookup_idx", "columns": [ { "expression": "project_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "keyword", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "location_code", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "language_code", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "fetched_at", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "keyword_metrics_project_id_projects_id_fk": { "name": "keyword_metrics_project_id_projects_id_fk", "tableFrom": "keyword_metrics", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.projects": { "name": "projects", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "organization_id": { "name": "organization_id", "type": "text", "primaryKey": false, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "domain": { "name": "domain", "type": "text", "primaryKey": false, "notNull": false }, "location_code": { "name": "location_code", "type": "integer", "primaryKey": false, "notNull": true, "default": 2840 }, "language_code": { "name": "language_code", "type": "text", "primaryKey": false, "notNull": true, "default": "'en'" }, "created_at": { "name": "created_at", "type": "text", "primaryKey": false, "notNull": true, "default": "to_char(now() AT TIME ZONE 'utc', 'YYYY-MM-DD\"T\"HH24:MI:SS.MS\"Z\"')" }, "archived_at": { "name": "archived_at", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": { "projects_one_default_per_organization_idx": { "name": "projects_one_default_per_organization_idx", "columns": [ { "expression": "organization_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "where": "\"projects\".\"name\" = 'Default' AND \"projects\".\"domain\" IS NULL AND \"projects\".\"archived_at\" IS NULL", "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "projects_organization_id_organization_id_fk": { "name": "projects_organization_id_organization_id_fk", "tableFrom": "projects", "tableTo": "organization", "columnsFrom": [ "organization_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.rank_check_runs": { "name": "rank_check_runs", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "config_id": { "name": "config_id", "type": "text", "primaryKey": false, "notNull": true }, "project_id": { "name": "project_id", "type": "text", "primaryKey": false, "notNull": true }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true, "default": "'pending'" }, "keywords_total": { "name": "keywords_total", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "keywords_checked": { "name": "keywords_checked", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 }, "is_subset_run": { "name": "is_subset_run", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "error_message": { "name": "error_message", "type": "text", "primaryKey": false, "notNull": false }, "started_at": { "name": "started_at", "type": "text", "primaryKey": false, "notNull": true, "default": "to_char(now() AT TIME ZONE 'utc', 'YYYY-MM-DD\"T\"HH24:MI:SS.MS\"Z\"')" }, "completed_at": { "name": "completed_at", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": { "rank_check_runs_config_idx": { "name": "rank_check_runs_config_idx", "columns": [ { "expression": "config_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "started_at", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "rank_check_runs_project_idx": { "name": "rank_check_runs_project_idx", "columns": [ { "expression": "project_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "started_at", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "rank_check_runs_one_active_per_config_idx": { "name": "rank_check_runs_one_active_per_config_idx", "columns": [ { "expression": "config_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "where": "\"rank_check_runs\".\"status\" IN ('pending', 'running')", "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "rank_check_runs_config_id_rank_tracking_configs_id_fk": { "name": "rank_check_runs_config_id_rank_tracking_configs_id_fk", "tableFrom": "rank_check_runs", "tableTo": "rank_tracking_configs", "columnsFrom": [ "config_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "rank_check_runs_project_id_projects_id_fk": { "name": "rank_check_runs_project_id_projects_id_fk", "tableFrom": "rank_check_runs", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.rank_snapshots": { "name": "rank_snapshots", "schema": "", "columns": { "id": { "name": "id", "type": "serial", "primaryKey": true, "notNull": true }, "run_id": { "name": "run_id", "type": "text", "primaryKey": false, "notNull": true }, "tracking_keyword_id": { "name": "tracking_keyword_id", "type": "text", "primaryKey": false, "notNull": true }, "keyword": { "name": "keyword", "type": "text", "primaryKey": false, "notNull": true }, "device": { "name": "device", "type": "text", "primaryKey": false, "notNull": true }, "position": { "name": "position", "type": "integer", "primaryKey": false, "notNull": false }, "url": { "name": "url", "type": "text", "primaryKey": false, "notNull": false }, "serp_features": { "name": "serp_features", "type": "text", "primaryKey": false, "notNull": false }, "checked_at": { "name": "checked_at", "type": "text", "primaryKey": false, "notNull": true, "default": "to_char(now() AT TIME ZONE 'utc', 'YYYY-MM-DD\"T\"HH24:MI:SS.MS\"Z\"')" } }, "indexes": { "rank_snapshots_run_idx": { "name": "rank_snapshots_run_idx", "columns": [ { "expression": "run_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "rank_snapshots_keyword_device_idx": { "name": "rank_snapshots_keyword_device_idx", "columns": [ { "expression": "tracking_keyword_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "device", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "checked_at", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "rank_snapshots_run_keyword_device_idx": { "name": "rank_snapshots_run_keyword_device_idx", "columns": [ { "expression": "run_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "tracking_keyword_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "device", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "rank_snapshots_run_id_rank_check_runs_id_fk": { "name": "rank_snapshots_run_id_rank_check_runs_id_fk", "tableFrom": "rank_snapshots", "tableTo": "rank_check_runs", "columnsFrom": [ "run_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.rank_tracking_configs": { "name": "rank_tracking_configs", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "project_id": { "name": "project_id", "type": "text", "primaryKey": false, "notNull": true }, "domain": { "name": "domain", "type": "text", "primaryKey": false, "notNull": true }, "location_code": { "name": "location_code", "type": "integer", "primaryKey": false, "notNull": true, "default": 2840 }, "language_code": { "name": "language_code", "type": "text", "primaryKey": false, "notNull": true, "default": "'en'" }, "devices": { "name": "devices", "type": "text", "primaryKey": false, "notNull": true, "default": "'both'" }, "serp_depth": { "name": "serp_depth", "type": "integer", "primaryKey": false, "notNull": true }, "schedule_interval": { "name": "schedule_interval", "type": "text", "primaryKey": false, "notNull": true, "default": "'weekly'" }, "is_active": { "name": "is_active", "type": "boolean", "primaryKey": false, "notNull": true, "default": true }, "last_checked_at": { "name": "last_checked_at", "type": "text", "primaryKey": false, "notNull": false }, "next_check_at": { "name": "next_check_at", "type": "text", "primaryKey": false, "notNull": false }, "last_skip_reason": { "name": "last_skip_reason", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "text", "primaryKey": false, "notNull": true, "default": "to_char(now() AT TIME ZONE 'utc', 'YYYY-MM-DD\"T\"HH24:MI:SS.MS\"Z\"')" } }, "indexes": { "rank_tracking_configs_project_domain_location_idx": { "name": "rank_tracking_configs_project_domain_location_idx", "columns": [ { "expression": "project_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "domain", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "location_code", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "rank_tracking_configs_project_id_projects_id_fk": { "name": "rank_tracking_configs_project_id_projects_id_fk", "tableFrom": "rank_tracking_configs", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.rank_tracking_keywords": { "name": "rank_tracking_keywords", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "config_id": { "name": "config_id", "type": "text", "primaryKey": false, "notNull": true }, "keyword": { "name": "keyword", "type": "text", "primaryKey": false, "notNull": true }, "search_volume": { "name": "search_volume", "type": "integer", "primaryKey": false, "notNull": false }, "keyword_difficulty": { "name": "keyword_difficulty", "type": "integer", "primaryKey": false, "notNull": false }, "cpc": { "name": "cpc", "type": "real", "primaryKey": false, "notNull": false }, "metrics_fetched_at": { "name": "metrics_fetched_at", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "text", "primaryKey": false, "notNull": true, "default": "to_char(now() AT TIME ZONE 'utc', 'YYYY-MM-DD\"T\"HH24:MI:SS.MS\"Z\"')" } }, "indexes": { "rank_tracking_keywords_config_keyword_idx": { "name": "rank_tracking_keywords_config_keyword_idx", "columns": [ { "expression": "config_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "keyword", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "rank_tracking_keywords_config_id_rank_tracking_configs_id_fk": { "name": "rank_tracking_keywords_config_id_rank_tracking_configs_id_fk", "tableFrom": "rank_tracking_keywords", "tableTo": "rank_tracking_configs", "columnsFrom": [ "config_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.saved_keyword_tag_assignments": { "name": "saved_keyword_tag_assignments", "schema": "", "columns": { "saved_keyword_id": { "name": "saved_keyword_id", "type": "text", "primaryKey": false, "notNull": true }, "tag_id": { "name": "tag_id", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "text", "primaryKey": false, "notNull": true, "default": "to_char(now() AT TIME ZONE 'utc', 'YYYY-MM-DD\"T\"HH24:MI:SS.MS\"Z\"')" } }, "indexes": { "saved_keyword_tag_assignments_unique_idx": { "name": "saved_keyword_tag_assignments_unique_idx", "columns": [ { "expression": "saved_keyword_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "tag_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} }, "saved_keyword_tag_assignments_keyword_idx": { "name": "saved_keyword_tag_assignments_keyword_idx", "columns": [ { "expression": "saved_keyword_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "saved_keyword_tag_assignments_tag_idx": { "name": "saved_keyword_tag_assignments_tag_idx", "columns": [ { "expression": "tag_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "saved_keyword_tag_assignments_saved_keyword_id_saved_keywords_id_fk": { "name": "saved_keyword_tag_assignments_saved_keyword_id_saved_keywords_id_fk", "tableFrom": "saved_keyword_tag_assignments", "tableTo": "saved_keywords", "columnsFrom": [ "saved_keyword_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "saved_keyword_tag_assignments_tag_id_saved_keyword_tags_id_fk": { "name": "saved_keyword_tag_assignments_tag_id_saved_keyword_tags_id_fk", "tableFrom": "saved_keyword_tag_assignments", "tableTo": "saved_keyword_tags", "columnsFrom": [ "tag_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.saved_keyword_tags": { "name": "saved_keyword_tags", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "project_id": { "name": "project_id", "type": "text", "primaryKey": false, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "normalized_name": { "name": "normalized_name", "type": "text", "primaryKey": false, "notNull": true }, "color": { "name": "color", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "text", "primaryKey": false, "notNull": true, "default": "to_char(now() AT TIME ZONE 'utc', 'YYYY-MM-DD\"T\"HH24:MI:SS.MS\"Z\"')" } }, "indexes": { "saved_keyword_tags_project_normalized_name_idx": { "name": "saved_keyword_tags_project_normalized_name_idx", "columns": [ { "expression": "project_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "normalized_name", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} }, "saved_keyword_tags_project_name_idx": { "name": "saved_keyword_tags_project_name_idx", "columns": [ { "expression": "project_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "name", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "saved_keyword_tags_project_id_projects_id_fk": { "name": "saved_keyword_tags_project_id_projects_id_fk", "tableFrom": "saved_keyword_tags", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.saved_keywords": { "name": "saved_keywords", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "project_id": { "name": "project_id", "type": "text", "primaryKey": false, "notNull": true }, "keyword": { "name": "keyword", "type": "text", "primaryKey": false, "notNull": true }, "location_code": { "name": "location_code", "type": "integer", "primaryKey": false, "notNull": true, "default": 2840 }, "language_code": { "name": "language_code", "type": "text", "primaryKey": false, "notNull": true, "default": "'en'" }, "created_at": { "name": "created_at", "type": "text", "primaryKey": false, "notNull": true, "default": "to_char(now() AT TIME ZONE 'utc', 'YYYY-MM-DD\"T\"HH24:MI:SS.MS\"Z\"')" } }, "indexes": { "saved_keywords_unique_project_keyword_location_language": { "name": "saved_keywords_unique_project_keyword_location_language", "columns": [ { "expression": "project_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "keyword", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "location_code", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "language_code", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} }, "saved_keywords_project_created_idx": { "name": "saved_keywords_project_created_idx", "columns": [ { "expression": "project_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "created_at", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "saved_keywords_project_id_projects_id_fk": { "name": "saved_keywords_project_id_projects_id_fk", "tableFrom": "saved_keywords", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.user_onboarding_answers": { "name": "user_onboarding_answers", "schema": "", "columns": { "user_id": { "name": "user_id", "type": "text", "primaryKey": true, "notNull": true }, "organization_id": { "name": "organization_id", "type": "text", "primaryKey": false, "notNull": true }, "interested_features": { "name": "interested_features", "type": "text", "primaryKey": false, "notNull": true, "default": "'[]'" }, "work_for": { "name": "work_for", "type": "text", "primaryKey": false, "notNull": false }, "client_website_count": { "name": "client_website_count", "type": "text", "primaryKey": false, "notNull": false }, "found_via": { "name": "found_via", "type": "text", "primaryKey": false, "notNull": false }, "mcp_setup_intent": { "name": "mcp_setup_intent", "type": "text", "primaryKey": false, "notNull": false }, "completed_at": { "name": "completed_at", "type": "text", "primaryKey": false, "notNull": false }, "gsc_nudge_dismissed_at": { "name": "gsc_nudge_dismissed_at", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "text", "primaryKey": false, "notNull": true, "default": "to_char(now() AT TIME ZONE 'utc', 'YYYY-MM-DD\"T\"HH24:MI:SS.MS\"Z\"')" }, "updated_at": { "name": "updated_at", "type": "text", "primaryKey": false, "notNull": true, "default": "to_char(now() AT TIME ZONE 'utc', 'YYYY-MM-DD\"T\"HH24:MI:SS.MS\"Z\"')" } }, "indexes": { "user_onboarding_answers_organization_idx": { "name": "user_onboarding_answers_organization_idx", "columns": [ { "expression": "organization_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "user_onboarding_answers_user_id_user_id_fk": { "name": "user_onboarding_answers_user_id_user_id_fk", "tableFrom": "user_onboarding_answers", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "user_onboarding_answers_organization_id_organization_id_fk": { "name": "user_onboarding_answers_organization_id_organization_id_fk", "tableFrom": "user_onboarding_answers", "tableTo": "organization", "columnsFrom": [ "organization_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.account": { "name": "account", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "account_id": { "name": "account_id", "type": "text", "primaryKey": false, "notNull": true }, "provider_id": { "name": "provider_id", "type": "text", "primaryKey": false, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "access_token": { "name": "access_token", "type": "text", "primaryKey": false, "notNull": false }, "refresh_token": { "name": "refresh_token", "type": "text", "primaryKey": false, "notNull": false }, "id_token": { "name": "id_token", "type": "text", "primaryKey": false, "notNull": false }, "access_token_expires_at": { "name": "access_token_expires_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "refresh_token_expires_at": { "name": "refresh_token_expires_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false }, "scope": { "name": "scope", "type": "text", "primaryKey": false, "notNull": false }, "password": { "name": "password", "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 } }, "indexes": { "account_userId_idx": { "name": "account_userId_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "account_user_id_user_id_fk": { "name": "account_user_id_user_id_fk", "tableFrom": "account", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.invitation": { "name": "invitation", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "organization_id": { "name": "organization_id", "type": "text", "primaryKey": false, "notNull": true }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": true }, "role": { "name": "role", "type": "text", "primaryKey": false, "notNull": false }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true, "default": "'pending'" }, "expires_at": { "name": "expires_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "inviter_id": { "name": "inviter_id", "type": "text", "primaryKey": false, "notNull": true } }, "indexes": { "invitation_organizationId_idx": { "name": "invitation_organizationId_idx", "columns": [ { "expression": "organization_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "invitation_email_idx": { "name": "invitation_email_idx", "columns": [ { "expression": "email", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "invitation_organization_id_organization_id_fk": { "name": "invitation_organization_id_organization_id_fk", "tableFrom": "invitation", "tableTo": "organization", "columnsFrom": [ "organization_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "invitation_inviter_id_user_id_fk": { "name": "invitation_inviter_id_user_id_fk", "tableFrom": "invitation", "tableTo": "user", "columnsFrom": [ "inviter_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.member": { "name": "member", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "organization_id": { "name": "organization_id", "type": "text", "primaryKey": false, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "role": { "name": "role", "type": "text", "primaryKey": false, "notNull": true, "default": "'member'" }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true } }, "indexes": { "member_organizationId_idx": { "name": "member_organizationId_idx", "columns": [ { "expression": "organization_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "member_userId_idx": { "name": "member_userId_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "member_organization_id_organization_id_fk": { "name": "member_organization_id_organization_id_fk", "tableFrom": "member", "tableTo": "organization", "columnsFrom": [ "organization_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "member_user_id_user_id_fk": { "name": "member_user_id_user_id_fk", "tableFrom": "member", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.organization": { "name": "organization", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "slug": { "name": "slug", "type": "text", "primaryKey": false, "notNull": true }, "logo": { "name": "logo", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "metadata": { "name": "metadata", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": { "organization_slug_uidx": { "name": "organization_slug_uidx", "columns": [ { "expression": "slug", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "organization_slug_unique": { "name": "organization_slug_unique", "nullsNotDistinct": false, "columns": [ "slug" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.session": { "name": "session", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "expires_at": { "name": "expires_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "token": { "name": "token", "type": "text", "primaryKey": false, "notNull": true }, "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 }, "ip_address": { "name": "ip_address", "type": "text", "primaryKey": false, "notNull": false }, "user_agent": { "name": "user_agent", "type": "text", "primaryKey": false, "notNull": false }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "active_organization_id": { "name": "active_organization_id", "type": "text", "primaryKey": false, "notNull": false } }, "indexes": { "session_userId_idx": { "name": "session_userId_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "session_user_id_user_id_fk": { "name": "session_user_id_user_id_fk", "tableFrom": "session", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": { "session_token_unique": { "name": "session_token_unique", "nullsNotDistinct": false, "columns": [ "token" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.user": { "name": "user", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true }, "email": { "name": "email", "type": "text", "primaryKey": false, "notNull": true }, "email_verified": { "name": "email_verified", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "image": { "name": "image", "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()" }, "analytics_opted_out": { "name": "analytics_opted_out", "type": "boolean", "primaryKey": false, "notNull": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": { "user_email_unique": { "name": "user_email_unique", "nullsNotDistinct": false, "columns": [ "email" ] } }, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.verification": { "name": "verification", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "identifier": { "name": "identifier", "type": "text", "primaryKey": false, "notNull": true }, "value": { "name": "value", "type": "text", "primaryKey": false, "notNull": true }, "expires_at": { "name": "expires_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true }, "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": { "verification_identifier_idx": { "name": "verification_identifier_idx", "columns": [ { "expression": "identifier", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.billing_customer_status": { "name": "billing_customer_status", "schema": "", "columns": { "organization_id": { "name": "organization_id", "type": "text", "primaryKey": true, "notNull": true }, "is_paying": { "name": "is_paying", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "paid_plan_id": { "name": "paid_plan_id", "type": "text", "primaryKey": false, "notNull": false }, "paid_plan_status": { "name": "paid_plan_status", "type": "text", "primaryKey": false, "notNull": false }, "customer_json": { "name": "customer_json", "type": "text", "primaryKey": false, "notNull": true }, "synced_at": { "name": "synced_at", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "text", "primaryKey": false, "notNull": true, "default": "to_char(now() AT TIME ZONE 'utc', 'YYYY-MM-DD\"T\"HH24:MI:SS.MS\"Z\"')" }, "updated_at": { "name": "updated_at", "type": "text", "primaryKey": false, "notNull": true, "default": "to_char(now() AT TIME ZONE 'utc', 'YYYY-MM-DD\"T\"HH24:MI:SS.MS\"Z\"')" } }, "indexes": {}, "foreignKeys": { "billing_customer_status_organization_id_organization_id_fk": { "name": "billing_customer_status_organization_id_organization_id_fk", "tableFrom": "billing_customer_status", "tableTo": "organization", "columnsFrom": [ "organization_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.gsc_connections": { "name": "gsc_connections", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "project_id": { "name": "project_id", "type": "text", "primaryKey": false, "notNull": true }, "organization_id": { "name": "organization_id", "type": "text", "primaryKey": false, "notNull": true }, "site_url": { "name": "site_url", "type": "text", "primaryKey": false, "notNull": true }, "connected_by_user_id": { "name": "connected_by_user_id", "type": "text", "primaryKey": false, "notNull": true }, "connected_account_email": { "name": "connected_account_email", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "text", "primaryKey": false, "notNull": true, "default": "to_char(now() AT TIME ZONE 'utc', 'YYYY-MM-DD\"T\"HH24:MI:SS.MS\"Z\"')" }, "updated_at": { "name": "updated_at", "type": "text", "primaryKey": false, "notNull": true, "default": "to_char(now() AT TIME ZONE 'utc', 'YYYY-MM-DD\"T\"HH24:MI:SS.MS\"Z\"')" } }, "indexes": { "gsc_connections_project_idx": { "name": "gsc_connections_project_idx", "columns": [ { "expression": "project_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} }, "gsc_connections_organization_idx": { "name": "gsc_connections_organization_idx", "columns": [ { "expression": "organization_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "gsc_connections_project_id_projects_id_fk": { "name": "gsc_connections_project_id_projects_id_fk", "tableFrom": "gsc_connections", "tableTo": "projects", "columnsFrom": [ "project_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "gsc_connections_organization_id_organization_id_fk": { "name": "gsc_connections_organization_id_organization_id_fk", "tableFrom": "gsc_connections", "tableTo": "organization", "columnsFrom": [ "organization_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.reddit_attributions": { "name": "reddit_attributions", "schema": "", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "organization_id": { "name": "organization_id", "type": "text", "primaryKey": false, "notNull": true }, "click_id": { "name": "click_id", "type": "text", "primaryKey": false, "notNull": false }, "uuid": { "name": "uuid", "type": "text", "primaryKey": false, "notNull": false }, "landing_page": { "name": "landing_page", "type": "text", "primaryKey": false, "notNull": false }, "referrer": { "name": "referrer", "type": "text", "primaryKey": false, "notNull": false }, "utm_source": { "name": "utm_source", "type": "text", "primaryKey": false, "notNull": false }, "utm_medium": { "name": "utm_medium", "type": "text", "primaryKey": false, "notNull": false }, "utm_campaign": { "name": "utm_campaign", "type": "text", "primaryKey": false, "notNull": false }, "utm_term": { "name": "utm_term", "type": "text", "primaryKey": false, "notNull": false }, "utm_content": { "name": "utm_content", "type": "text", "primaryKey": false, "notNull": false }, "signup_sent_at": { "name": "signup_sent_at", "type": "text", "primaryKey": false, "notNull": false }, "purchase_sent_at": { "name": "purchase_sent_at", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "text", "primaryKey": false, "notNull": true, "default": "to_char(now() AT TIME ZONE 'utc', 'YYYY-MM-DD\"T\"HH24:MI:SS.MS\"Z\"')" }, "updated_at": { "name": "updated_at", "type": "text", "primaryKey": false, "notNull": true, "default": "to_char(now() AT TIME ZONE 'utc', 'YYYY-MM-DD\"T\"HH24:MI:SS.MS\"Z\"')" } }, "indexes": { "reddit_attributions_user_idx": { "name": "reddit_attributions_user_idx", "columns": [ { "expression": "user_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} }, "reddit_attributions_organization_idx": { "name": "reddit_attributions_organization_idx", "columns": [ { "expression": "organization_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "reddit_attributions_user_id_user_id_fk": { "name": "reddit_attributions_user_id_user_id_fk", "tableFrom": "reddit_attributions", "tableTo": "user", "columnsFrom": [ "user_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "reddit_attributions_organization_id_organization_id_fk": { "name": "reddit_attributions_organization_id_organization_id_fk", "tableFrom": "reddit_attributions", "tableTo": "organization", "columnsFrom": [ "organization_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false } }, "enums": {}, "schemas": {}, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } }