{
  "id": "6955a337-e5d0-41c7-a9b4-adcca9539b09",
  "prevId": "00000000-0000-0000-0000-000000000000",
  "version": "7",
  "dialect": "postgresql",
  "tables": {
    "public.ad_clicks": {
      "name": "ad_clicks",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "ad_id": {
          "name": "ad_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "session_id": {
          "name": "session_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_ad_clicks_ad": {
          "name": "idx_ad_clicks_ad",
          "columns": [
            {
              "expression": "ad_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_ad_clicks_session": {
          "name": "idx_ad_clicks_session",
          "columns": [
            {
              "expression": "session_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_ad_clicks_date": {
          "name": "idx_ad_clicks_date",
          "columns": [
            {
              "expression": "created_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "ad_clicks_ad_id_ads_id_fk": {
          "name": "ad_clicks_ad_id_ads_id_fk",
          "tableFrom": "ad_clicks",
          "tableTo": "ads",
          "columnsFrom": [
            "ad_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.ad_impressions": {
      "name": "ad_impressions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "ad_id": {
          "name": "ad_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "session_id": {
          "name": "session_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_ad_impressions_ad": {
          "name": "idx_ad_impressions_ad",
          "columns": [
            {
              "expression": "ad_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_ad_impressions_session": {
          "name": "idx_ad_impressions_session",
          "columns": [
            {
              "expression": "session_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_ad_impressions_date": {
          "name": "idx_ad_impressions_date",
          "columns": [
            {
              "expression": "created_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "ad_impressions_ad_id_ads_id_fk": {
          "name": "ad_impressions_ad_id_ads_id_fk",
          "tableFrom": "ad_impressions",
          "tableTo": "ads",
          "columnsFrom": [
            "ad_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.ads": {
      "name": "ads",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "variant": {
          "name": "variant",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "image_path": {
          "name": "image_path",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "link_url": {
          "name": "link_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "visibility": {
          "name": "visibility",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'everyone'"
        },
        "is_active": {
          "name": "is_active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "position": {
          "name": "position",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "impression_count": {
          "name": "impression_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "click_count": {
          "name": "click_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_ads_type": {
          "name": "idx_ads_type",
          "columns": [
            {
              "expression": "type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_ads_is_active": {
          "name": "idx_ads_is_active",
          "columns": [
            {
              "expression": "is_active",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_ads_visibility": {
          "name": "idx_ads_visibility",
          "columns": [
            {
              "expression": "visibility",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.app_settings": {
      "name": "app_settings",
      "schema": "",
      "columns": {
        "key": {
          "name": "key",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "value": {
          "name": "value",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.auth_tokens": {
      "name": "auth_tokens",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "token": {
          "name": "token",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "type": {
          "name": "type",
          "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": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_auth_tokens_token": {
          "name": "idx_auth_tokens_token",
          "columns": [
            {
              "expression": "token",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_auth_tokens_user": {
          "name": "idx_auth_tokens_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "auth_tokens_token_unique": {
          "name": "auth_tokens_token_unique",
          "nullsNotDistinct": false,
          "columns": [
            "token"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.chat_thread_read_status": {
      "name": "chat_thread_read_status",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "media_id": {
          "name": "media_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "last_seen_at": {
          "name": "last_seen_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {
        "idx_chat_thread_read_unique": {
          "name": "idx_chat_thread_read_unique",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "media_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_chat_thread_read_user": {
          "name": "idx_chat_thread_read_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.close_friends": {
      "name": "close_friends",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "close_friend_id": {
          "name": "close_friend_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "added_at": {
          "name": "added_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_close_friends_unique": {
          "name": "idx_close_friends_unique",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "close_friend_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_close_friends_user": {
          "name": "idx_close_friends_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "close_friends_user_id_users_id_fk": {
          "name": "close_friends_user_id_users_id_fk",
          "tableFrom": "close_friends",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "close_friends_close_friend_id_users_id_fk": {
          "name": "close_friends_close_friend_id_users_id_fk",
          "tableFrom": "close_friends",
          "tableTo": "users",
          "columnsFrom": [
            "close_friend_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.comment_moderation": {
      "name": "comment_moderation",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "comment_id": {
          "name": "comment_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "moderated_by": {
          "name": "moderated_by",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "moderated_at": {
          "name": "moderated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "reason": {
          "name": "reason",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_comment_moderation_comment": {
          "name": "idx_comment_moderation_comment",
          "columns": [
            {
              "expression": "comment_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_comment_moderation_status": {
          "name": "idx_comment_moderation_status",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.comments": {
      "name": "comments",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "media_id": {
          "name": "media_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "session_id": {
          "name": "session_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "content": {
          "name": "content",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "safety_status": {
          "name": "safety_status",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'pending'"
        },
        "safety_checked_at": {
          "name": "safety_checked_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "safety_categories": {
          "name": "safety_categories",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "safety_reasoning": {
          "name": "safety_reasoning",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_hidden": {
          "name": "is_hidden",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "hidden_at": {
          "name": "hidden_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "hidden_reason": {
          "name": "hidden_reason",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "moderation_notes": {
          "name": "moderation_notes",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_comments_media": {
          "name": "idx_comments_media",
          "columns": [
            {
              "expression": "media_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_comments_session": {
          "name": "idx_comments_session",
          "columns": [
            {
              "expression": "session_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_comments_user": {
          "name": "idx_comments_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_comments_safety_status": {
          "name": "idx_comments_safety_status",
          "columns": [
            {
              "expression": "safety_status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_comments_is_hidden": {
          "name": "idx_comments_is_hidden",
          "columns": [
            {
              "expression": "is_hidden",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.compilations": {
      "name": "compilations",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "filename": {
          "name": "filename",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "path": {
          "name": "path",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "duration_seconds": {
          "name": "duration_seconds",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "video_ids": {
          "name": "video_ids",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "settings": {
          "name": "settings",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.content_reports": {
      "name": "content_reports",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "media_id": {
          "name": "media_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "session_id": {
          "name": "session_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "report_type": {
          "name": "report_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "resolved_by": {
          "name": "resolved_by",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "resolved_at": {
          "name": "resolved_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "resolution_notes": {
          "name": "resolution_notes",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_content_reports_media": {
          "name": "idx_content_reports_media",
          "columns": [
            {
              "expression": "media_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_content_reports_status": {
          "name": "idx_content_reports_status",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_content_reports_session": {
          "name": "idx_content_reports_session",
          "columns": [
            {
              "expression": "session_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_content_reports_created": {
          "name": "idx_content_reports_created",
          "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.creators": {
      "name": "creators",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "slug": {
          "name": "slug",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "gender": {
          "name": "gender",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "primary_face_id": {
          "name": "primary_face_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "face_count": {
          "name": "face_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "video_count": {
          "name": "video_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "tag_id": {
          "name": "tag_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "is_public": {
          "name": "is_public",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "centroid_embedding": {
          "name": "centroid_embedding",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "centroid_updated_at": {
          "name": "centroid_updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "centroid_face_count": {
          "name": "centroid_face_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "embedding_variance": {
          "name": "embedding_variance",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "avg_intra_cluster_similarity": {
          "name": "avg_intra_cluster_similarity",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "avg_age": {
          "name": "avg_age",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "age_std_dev": {
          "name": "age_std_dev",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_creators_name": {
          "name": "idx_creators_name",
          "columns": [
            {
              "expression": "name",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_creators_slug": {
          "name": "idx_creators_slug",
          "columns": [
            {
              "expression": "slug",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_creators_gender": {
          "name": "idx_creators_gender",
          "columns": [
            {
              "expression": "gender",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_creators_tag": {
          "name": "idx_creators_tag",
          "columns": [
            {
              "expression": "tag_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_creators_public": {
          "name": "idx_creators_public",
          "columns": [
            {
              "expression": "is_public",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "creators_name_unique": {
          "name": "creators_name_unique",
          "nullsNotDistinct": false,
          "columns": [
            "name"
          ]
        },
        "creators_slug_unique": {
          "name": "creators_slug_unique",
          "nullsNotDistinct": false,
          "columns": [
            "slug"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.digest_clip_tags": {
      "name": "digest_clip_tags",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "clip_id": {
          "name": "clip_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "tag_id": {
          "name": "tag_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "source": {
          "name": "source",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'auto'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_digest_clip_tags_clip": {
          "name": "idx_digest_clip_tags_clip",
          "columns": [
            {
              "expression": "clip_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_clip_tags_tag": {
          "name": "idx_digest_clip_tags_tag",
          "columns": [
            {
              "expression": "tag_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_clip_tags_unique": {
          "name": "idx_digest_clip_tags_unique",
          "columns": [
            {
              "expression": "clip_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "tag_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.digest_compilations": {
      "name": "digest_compilations",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "digest_id": {
          "name": "digest_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "video_id": {
          "name": "video_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "folder_id": {
          "name": "folder_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "filename": {
          "name": "filename",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "path": {
          "name": "path",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "duration_seconds": {
          "name": "duration_seconds",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "orientation": {
          "name": "orientation",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "error": {
          "name": "error",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "has_captions": {
          "name": "has_captions",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "caption_style": {
          "name": "caption_style",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "closing_ad_path": {
          "name": "closing_ad_path",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "closing_ad_duration": {
          "name": "closing_ad_duration",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "tags": {
          "name": "tags",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "completed_at": {
          "name": "completed_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_digest_compilations_digest": {
          "name": "idx_digest_compilations_digest",
          "columns": [
            {
              "expression": "digest_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_compilations_video": {
          "name": "idx_digest_compilations_video",
          "columns": [
            {
              "expression": "video_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_compilations_status": {
          "name": "idx_digest_compilations_status",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_compilations_folder": {
          "name": "idx_digest_compilations_folder",
          "columns": [
            {
              "expression": "folder_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.digest_generated_clips": {
      "name": "digest_generated_clips",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "selected_clip_id": {
          "name": "selected_clip_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "digest_id": {
          "name": "digest_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "folder_id": {
          "name": "folder_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "clip_path": {
          "name": "clip_path",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "gif_path": {
          "name": "gif_path",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "error": {
          "name": "error",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "completed_at": {
          "name": "completed_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "published_to_public_media_id": {
          "name": "published_to_public_media_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "published_at": {
          "name": "published_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_digest_generated_clips_selected": {
          "name": "idx_digest_generated_clips_selected",
          "columns": [
            {
              "expression": "selected_clip_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_generated_clips_digest": {
          "name": "idx_digest_generated_clips_digest",
          "columns": [
            {
              "expression": "digest_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_generated_clips_status": {
          "name": "idx_digest_generated_clips_status",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_generated_clips_folder": {
          "name": "idx_digest_generated_clips_folder",
          "columns": [
            {
              "expression": "folder_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.digest_generated_scenes": {
      "name": "digest_generated_scenes",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "digest_id": {
          "name": "digest_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "video_id": {
          "name": "video_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "folder_id": {
          "name": "folder_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "scene_number": {
          "name": "scene_number",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "scene_path": {
          "name": "scene_path",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "start_time": {
          "name": "start_time",
          "type": "real",
          "primaryKey": false,
          "notNull": true
        },
        "end_time": {
          "name": "end_time",
          "type": "real",
          "primaryKey": false,
          "notNull": true
        },
        "duration": {
          "name": "duration",
          "type": "real",
          "primaryKey": false,
          "notNull": true
        },
        "tags": {
          "name": "tags",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "dominant_position": {
          "name": "dominant_position",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "published_to_public_media_id": {
          "name": "published_to_public_media_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "published_at": {
          "name": "published_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_digest_generated_scenes_digest": {
          "name": "idx_digest_generated_scenes_digest",
          "columns": [
            {
              "expression": "digest_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_generated_scenes_video": {
          "name": "idx_digest_generated_scenes_video",
          "columns": [
            {
              "expression": "video_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_generated_scenes_folder": {
          "name": "idx_digest_generated_scenes_folder",
          "columns": [
            {
              "expression": "folder_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_generated_scenes_path": {
          "name": "idx_digest_generated_scenes_path",
          "columns": [
            {
              "expression": "scene_path",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.digest_output_folders": {
      "name": "digest_output_folders",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "digest_id": {
          "name": "digest_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "video_id": {
          "name": "video_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "folder_path": {
          "name": "folder_path",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "folder_name": {
          "name": "folder_name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "folder_type": {
          "name": "folder_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'clips'"
        },
        "clip_count": {
          "name": "clip_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "compilation_count": {
          "name": "compilation_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "total_size": {
          "name": "total_size",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_digest_output_folders_digest": {
          "name": "idx_digest_output_folders_digest",
          "columns": [
            {
              "expression": "digest_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_output_folders_video": {
          "name": "idx_digest_output_folders_video",
          "columns": [
            {
              "expression": "video_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_output_folders_path": {
          "name": "idx_digest_output_folders_path",
          "columns": [
            {
              "expression": "folder_path",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.digest_selected_clips": {
      "name": "digest_selected_clips",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "digest_id": {
          "name": "digest_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "video_id": {
          "name": "video_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "clip_type": {
          "name": "clip_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "start_time": {
          "name": "start_time",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "end_time": {
          "name": "end_time",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "duration": {
          "name": "duration",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "reason": {
          "name": "reason",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "interest_score": {
          "name": "interest_score",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "position": {
          "name": "position",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "transcript_hint": {
          "name": "transcript_hint",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "tags": {
          "name": "tags",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "source": {
          "name": "source",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'machine'"
        },
        "is_included": {
          "name": "is_included",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 1
        },
        "is_hook": {
          "name": "is_hook",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "sequence_order": {
          "name": "sequence_order",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "hook_source_clip_id": {
          "name": "hook_source_clip_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_digest_selected_clips_digest": {
          "name": "idx_digest_selected_clips_digest",
          "columns": [
            {
              "expression": "digest_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_selected_clips_video": {
          "name": "idx_digest_selected_clips_video",
          "columns": [
            {
              "expression": "video_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_selected_clips_type": {
          "name": "idx_digest_selected_clips_type",
          "columns": [
            {
              "expression": "clip_type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_selected_clips_source": {
          "name": "idx_digest_selected_clips_source",
          "columns": [
            {
              "expression": "source",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_selected_clips_sequence": {
          "name": "idx_digest_selected_clips_sequence",
          "columns": [
            {
              "expression": "sequence_order",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_selected_clips_is_hook": {
          "name": "idx_digest_selected_clips_is_hook",
          "columns": [
            {
              "expression": "is_hook",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_selected_clips_hook_source": {
          "name": "idx_digest_selected_clips_hook_source",
          "columns": [
            {
              "expression": "hook_source_clip_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.digest_suggested_tags": {
      "name": "digest_suggested_tags",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "digest_id": {
          "name": "digest_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "video_id": {
          "name": "video_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "suggested_category": {
          "name": "suggested_category",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "suggested_value": {
          "name": "suggested_value",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "confidence": {
          "name": "confidence",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "mapped_tag_id": {
          "name": "mapped_tag_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "reviewed_by": {
          "name": "reviewed_by",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "reviewed_at": {
          "name": "reviewed_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_digest_suggested_tags_digest": {
          "name": "idx_digest_suggested_tags_digest",
          "columns": [
            {
              "expression": "digest_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_suggested_tags_video": {
          "name": "idx_digest_suggested_tags_video",
          "columns": [
            {
              "expression": "video_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_suggested_tags_status": {
          "name": "idx_digest_suggested_tags_status",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_suggested_tags_cat_val": {
          "name": "idx_digest_suggested_tags_cat_val",
          "columns": [
            {
              "expression": "suggested_category",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "suggested_value",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.digest_video_tags": {
      "name": "digest_video_tags",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "digest_id": {
          "name": "digest_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "video_id": {
          "name": "video_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "category": {
          "name": "category",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "value": {
          "name": "value",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "confidence": {
          "name": "confidence",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "source": {
          "name": "source",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'digest'"
        },
        "evidence": {
          "name": "evidence",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_digest_video_tags_digest": {
          "name": "idx_digest_video_tags_digest",
          "columns": [
            {
              "expression": "digest_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_video_tags_video": {
          "name": "idx_digest_video_tags_video",
          "columns": [
            {
              "expression": "video_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_video_tags_category": {
          "name": "idx_digest_video_tags_category",
          "columns": [
            {
              "expression": "category",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_video_tags_value": {
          "name": "idx_digest_video_tags_value",
          "columns": [
            {
              "expression": "value",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_digest_video_tags_cat_val": {
          "name": "idx_digest_video_tags_cat_val",
          "columns": [
            {
              "expression": "category",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "value",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.email_change_tokens": {
      "name": "email_change_tokens",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "new_email": {
          "name": "new_email",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "token": {
          "name": "token",
          "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": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_email_change_tokens_token": {
          "name": "idx_email_change_tokens_token",
          "columns": [
            {
              "expression": "token",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_email_change_tokens_user": {
          "name": "idx_email_change_tokens_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "email_change_tokens_token_unique": {
          "name": "email_change_tokens_token_unique",
          "nullsNotDistinct": false,
          "columns": [
            "token"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.email_verification_tokens": {
      "name": "email_verification_tokens",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "token": {
          "name": "token",
          "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": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_email_verification_tokens_token": {
          "name": "idx_email_verification_tokens_token",
          "columns": [
            {
              "expression": "token",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_email_verification_tokens_user": {
          "name": "idx_email_verification_tokens_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "email_verification_tokens_token_unique": {
          "name": "email_verification_tokens_token_unique",
          "nullsNotDistinct": false,
          "columns": [
            "token"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.featured_playlists": {
      "name": "featured_playlists",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "playlist_id": {
          "name": "playlist_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "position": {
          "name": "position",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "featured_by": {
          "name": "featured_by",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "featured_at": {
          "name": "featured_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_featured_playlists_position": {
          "name": "idx_featured_playlists_position",
          "columns": [
            {
              "expression": "position",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "featured_playlists_playlist_id_unique": {
          "name": "featured_playlists_playlist_id_unique",
          "nullsNotDistinct": false,
          "columns": [
            "playlist_id"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.friendships": {
      "name": "friendships",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "friend_id": {
          "name": "friend_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "accepted_at": {
          "name": "accepted_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_friendships_user_friend": {
          "name": "idx_friendships_user_friend",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "friend_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_friendships_user": {
          "name": "idx_friendships_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_friendships_friend": {
          "name": "idx_friendships_friend",
          "columns": [
            {
              "expression": "friend_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_friendships_status": {
          "name": "idx_friendships_status",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.geo_blocking_rules": {
      "name": "geo_blocking_rules",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "country": {
          "name": "country",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "country_name": {
          "name": "country_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "region": {
          "name": "region",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "city": {
          "name": "city",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "created_by": {
          "name": "created_by",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "note": {
          "name": "note",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_geo_blocking_country": {
          "name": "idx_geo_blocking_country",
          "columns": [
            {
              "expression": "country",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_geo_blocking_unique": {
          "name": "idx_geo_blocking_unique",
          "columns": [
            {
              "expression": "country",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "region",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "city",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "geo_blocking_rules_created_by_users_id_fk": {
          "name": "geo_blocking_rules_created_by_users_id_fk",
          "tableFrom": "geo_blocking_rules",
          "tableTo": "users",
          "columnsFrom": [
            "created_by"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.highlight_cooldowns": {
      "name": "highlight_cooldowns",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "last_generated_at": {
          "name": "last_generated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {
        "idx_highlight_cooldowns_user": {
          "name": "idx_highlight_cooldowns_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.invoices": {
      "name": "invoices",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "plan_id": {
          "name": "plan_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "invoice_number": {
          "name": "invoice_number",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "amount_cad": {
          "name": "amount_cad",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "due_date": {
          "name": "due_date",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true
        },
        "paid_at": {
          "name": "paid_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "payment_id": {
          "name": "payment_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "notes": {
          "name": "notes",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_invoices_user": {
          "name": "idx_invoices_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_invoices_status": {
          "name": "idx_invoices_status",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_invoices_due_date": {
          "name": "idx_invoices_due_date",
          "columns": [
            {
              "expression": "due_date",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_invoices_number": {
          "name": "idx_invoices_number",
          "columns": [
            {
              "expression": "invoice_number",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "invoices_user_id_users_id_fk": {
          "name": "invoices_user_id_users_id_fk",
          "tableFrom": "invoices",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "invoices_plan_id_subscription_plans_id_fk": {
          "name": "invoices_plan_id_subscription_plans_id_fk",
          "tableFrom": "invoices",
          "tableTo": "subscription_plans",
          "columnsFrom": [
            "plan_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "invoices_invoice_number_unique": {
          "name": "invoices_invoice_number_unique",
          "nullsNotDistinct": false,
          "columns": [
            "invoice_number"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.jobs": {
      "name": "jobs",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'pending'"
        },
        "progress": {
          "name": "progress",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "log": {
          "name": "log",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "params": {
          "name": "params",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "started_at": {
          "name": "started_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "completed_at": {
          "name": "completed_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "resource_category": {
          "name": "resource_category",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'cpu'"
        },
        "vram_required": {
          "name": "vram_required",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "queue_position": {
          "name": "queue_position",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "waiting_reason": {
          "name": "waiting_reason",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "priority": {
          "name": "priority",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 5
        },
        "pipeline_id": {
          "name": "pipeline_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "pipeline_step_id": {
          "name": "pipeline_step_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_jobs_queue": {
          "name": "idx_jobs_queue",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "priority",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "created_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_jobs_resource": {
          "name": "idx_jobs_resource",
          "columns": [
            {
              "expression": "resource_category",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_jobs_pipeline": {
          "name": "idx_jobs_pipeline",
          "columns": [
            {
              "expression": "pipeline_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.moderation_word_lists": {
      "name": "moderation_word_lists",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "level": {
          "name": "level",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "word": {
          "name": "word",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "created_by": {
          "name": "created_by",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_moderation_word_lists_level": {
          "name": "idx_moderation_word_lists_level",
          "columns": [
            {
              "expression": "level",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_moderation_word_lists_word": {
          "name": "idx_moderation_word_lists_word",
          "columns": [
            {
              "expression": "word",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.notification_preferences": {
      "name": "notification_preferences",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "email_friend_request": {
          "name": "email_friend_request",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "email_friend_request_accepted": {
          "name": "email_friend_request_accepted",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "email_poke": {
          "name": "email_poke",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "email_video_recommendation": {
          "name": "email_video_recommendation",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "email_watch_party_invite": {
          "name": "email_watch_party_invite",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "email_achievement": {
          "name": "email_achievement",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "email_digest_complete": {
          "name": "email_digest_complete",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "email_digest_failed": {
          "name": "email_digest_failed",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "email_upload_approved": {
          "name": "email_upload_approved",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "email_upload_rejected": {
          "name": "email_upload_rejected",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "inapp_friend_request": {
          "name": "inapp_friend_request",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "inapp_friend_request_accepted": {
          "name": "inapp_friend_request_accepted",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "inapp_poke": {
          "name": "inapp_poke",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "inapp_video_recommendation": {
          "name": "inapp_video_recommendation",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "inapp_watch_party_invite": {
          "name": "inapp_watch_party_invite",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "inapp_achievement": {
          "name": "inapp_achievement",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "inapp_digest_complete": {
          "name": "inapp_digest_complete",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "inapp_digest_failed": {
          "name": "inapp_digest_failed",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "inapp_upload_approved": {
          "name": "inapp_upload_approved",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "inapp_upload_rejected": {
          "name": "inapp_upload_rejected",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "inapp_comment_reply": {
          "name": "inapp_comment_reply",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "inapp_system": {
          "name": "inapp_system",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "quiet_hours_enabled": {
          "name": "quiet_hours_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "quiet_hours_start": {
          "name": "quiet_hours_start",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "quiet_hours_end": {
          "name": "quiet_hours_end",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_notification_preferences_user": {
          "name": "idx_notification_preferences_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "notification_preferences_user_id_users_id_fk": {
          "name": "notification_preferences_user_id_users_id_fk",
          "tableFrom": "notification_preferences",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "notification_preferences_user_id_unique": {
          "name": "notification_preferences_user_id_unique",
          "nullsNotDistinct": false,
          "columns": [
            "user_id"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.notifications": {
      "name": "notifications",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "message": {
          "name": "message",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "reference_type": {
          "name": "reference_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "reference_id": {
          "name": "reference_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "actor_id": {
          "name": "actor_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "metadata": {
          "name": "metadata",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "is_read": {
          "name": "is_read",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "action_url": {
          "name": "action_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "group_key": {
          "name": "group_key",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "read_at": {
          "name": "read_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_notifications_user_unread": {
          "name": "idx_notifications_user_unread",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "is_read",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_notifications_user_created": {
          "name": "idx_notifications_user_created",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "created_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_notifications_type": {
          "name": "idx_notifications_type",
          "columns": [
            {
              "expression": "type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_notifications_created": {
          "name": "idx_notifications_created",
          "columns": [
            {
              "expression": "created_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_notifications_actor": {
          "name": "idx_notifications_actor",
          "columns": [
            {
              "expression": "actor_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "notifications_user_id_users_id_fk": {
          "name": "notifications_user_id_users_id_fk",
          "tableFrom": "notifications",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "notifications_actor_id_users_id_fk": {
          "name": "notifications_actor_id_users_id_fk",
          "tableFrom": "notifications",
          "tableTo": "users",
          "columnsFrom": [
            "actor_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.password_reset_tokens": {
      "name": "password_reset_tokens",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "token": {
          "name": "token",
          "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": false,
          "default": "now()"
        },
        "used_at": {
          "name": "used_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_password_reset_tokens_token": {
          "name": "idx_password_reset_tokens_token",
          "columns": [
            {
              "expression": "token",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_password_reset_tokens_user": {
          "name": "idx_password_reset_tokens_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "password_reset_tokens_token_unique": {
          "name": "password_reset_tokens_token_unique",
          "nullsNotDistinct": false,
          "columns": [
            "token"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.payment_audit_log": {
      "name": "payment_audit_log",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "payment_id": {
          "name": "payment_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "invoice_id": {
          "name": "invoice_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "action": {
          "name": "action",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "previous_state": {
          "name": "previous_state",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "new_state": {
          "name": "new_state",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "performed_by": {
          "name": "performed_by",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "notes": {
          "name": "notes",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "ip_address": {
          "name": "ip_address",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_payment_audit_payment": {
          "name": "idx_payment_audit_payment",
          "columns": [
            {
              "expression": "payment_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_payment_audit_invoice": {
          "name": "idx_payment_audit_invoice",
          "columns": [
            {
              "expression": "invoice_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_payment_audit_user": {
          "name": "idx_payment_audit_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_payment_audit_action": {
          "name": "idx_payment_audit_action",
          "columns": [
            {
              "expression": "action",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_payment_audit_created": {
          "name": "idx_payment_audit_created",
          "columns": [
            {
              "expression": "created_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "payment_audit_log_payment_id_payments_id_fk": {
          "name": "payment_audit_log_payment_id_payments_id_fk",
          "tableFrom": "payment_audit_log",
          "tableTo": "payments",
          "columnsFrom": [
            "payment_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "payment_audit_log_invoice_id_invoices_id_fk": {
          "name": "payment_audit_log_invoice_id_invoices_id_fk",
          "tableFrom": "payment_audit_log",
          "tableTo": "invoices",
          "columnsFrom": [
            "invoice_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "payment_audit_log_user_id_users_id_fk": {
          "name": "payment_audit_log_user_id_users_id_fk",
          "tableFrom": "payment_audit_log",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.payments": {
      "name": "payments",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "invoice_id": {
          "name": "invoice_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "sender_email": {
          "name": "sender_email",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "sender_name": {
          "name": "sender_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "amount_cad": {
          "name": "amount_cad",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "reference_number": {
          "name": "reference_number",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "custom_message": {
          "name": "custom_message",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'unmatched'"
        },
        "match_confidence": {
          "name": "match_confidence",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "match_method": {
          "name": "match_method",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "raw_email_json": {
          "name": "raw_email_json",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "received_at": {
          "name": "received_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true
        },
        "processed_at": {
          "name": "processed_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "processed_by": {
          "name": "processed_by",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_payments_user": {
          "name": "idx_payments_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_payments_invoice": {
          "name": "idx_payments_invoice",
          "columns": [
            {
              "expression": "invoice_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_payments_status": {
          "name": "idx_payments_status",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_payments_sender_email": {
          "name": "idx_payments_sender_email",
          "columns": [
            {
              "expression": "sender_email",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_payments_reference": {
          "name": "idx_payments_reference",
          "columns": [
            {
              "expression": "reference_number",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_payments_received_at": {
          "name": "idx_payments_received_at",
          "columns": [
            {
              "expression": "received_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "payments_invoice_id_invoices_id_fk": {
          "name": "payments_invoice_id_invoices_id_fk",
          "tableFrom": "payments",
          "tableTo": "invoices",
          "columnsFrom": [
            "invoice_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "payments_user_id_users_id_fk": {
          "name": "payments_user_id_users_id_fk",
          "tableFrom": "payments",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "payments_reference_number_unique": {
          "name": "payments_reference_number_unique",
          "nullsNotDistinct": false,
          "columns": [
            "reference_number"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.performer_discrepancies": {
      "name": "performer_discrepancies",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "video_id": {
          "name": "video_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "digest_id": {
          "name": "digest_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "parsed_performer_name": {
          "name": "parsed_performer_name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "parsed_method": {
          "name": "parsed_method",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "parsed_confidence": {
          "name": "parsed_confidence",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "detected_performer_id": {
          "name": "detected_performer_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "detected_performer_name": {
          "name": "detected_performer_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "face_match_confidence": {
          "name": "face_match_confidence",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "face_similarity": {
          "name": "face_similarity",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "discrepancy_type": {
          "name": "discrepancy_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "resolved_by": {
          "name": "resolved_by",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "resolved_at": {
          "name": "resolved_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "resolution": {
          "name": "resolution",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "admin_notes": {
          "name": "admin_notes",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_discrepancies_video": {
          "name": "idx_discrepancies_video",
          "columns": [
            {
              "expression": "video_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_discrepancies_digest": {
          "name": "idx_discrepancies_digest",
          "columns": [
            {
              "expression": "digest_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_discrepancies_status": {
          "name": "idx_discrepancies_status",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_discrepancies_type": {
          "name": "idx_discrepancies_type",
          "columns": [
            {
              "expression": "discrepancy_type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_discrepancies_detected_performer": {
          "name": "idx_discrepancies_detected_performer",
          "columns": [
            {
              "expression": "detected_performer_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "performer_discrepancies_video_id_videos_id_fk": {
          "name": "performer_discrepancies_video_id_videos_id_fk",
          "tableFrom": "performer_discrepancies",
          "tableTo": "videos",
          "columnsFrom": [
            "video_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "performer_discrepancies_digest_id_video_digests_id_fk": {
          "name": "performer_discrepancies_digest_id_video_digests_id_fk",
          "tableFrom": "performer_discrepancies",
          "tableTo": "video_digests",
          "columnsFrom": [
            "digest_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "performer_discrepancies_detected_performer_id_creators_id_fk": {
          "name": "performer_discrepancies_detected_performer_id_creators_id_fk",
          "tableFrom": "performer_discrepancies",
          "tableTo": "creators",
          "columnsFrom": [
            "detected_performer_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "performer_discrepancies_resolved_by_users_id_fk": {
          "name": "performer_discrepancies_resolved_by_users_id_fk",
          "tableFrom": "performer_discrepancies",
          "tableTo": "users",
          "columnsFrom": [
            "resolved_by"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.performer_faces": {
      "name": "performer_faces",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "performer_id": {
          "name": "performer_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "performer_name": {
          "name": "performer_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "face_embedding": {
          "name": "face_embedding",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true
        },
        "gender": {
          "name": "gender",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "age": {
          "name": "age",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "detection_score": {
          "name": "detection_score",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "bbox": {
          "name": "bbox",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "face_crop_path": {
          "name": "face_crop_path",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "source_frame": {
          "name": "source_frame",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "source_video": {
          "name": "source_video",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "source_digest_id": {
          "name": "source_digest_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "frame_timestamp": {
          "name": "frame_timestamp",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "frame_index": {
          "name": "frame_index",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "faces_in_frame": {
          "name": "faces_in_frame",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 1
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'pending'"
        },
        "match_confidence": {
          "name": "match_confidence",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "is_verified": {
          "name": "is_verified",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_performer_faces_performer": {
          "name": "idx_performer_faces_performer",
          "columns": [
            {
              "expression": "performer_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_performer_faces_name": {
          "name": "idx_performer_faces_name",
          "columns": [
            {
              "expression": "performer_name",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_performer_faces_video": {
          "name": "idx_performer_faces_video",
          "columns": [
            {
              "expression": "source_video",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_performer_faces_gender": {
          "name": "idx_performer_faces_gender",
          "columns": [
            {
              "expression": "gender",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_performer_faces_digest": {
          "name": "idx_performer_faces_digest",
          "columns": [
            {
              "expression": "source_digest_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_performer_faces_crop": {
          "name": "idx_performer_faces_crop",
          "columns": [
            {
              "expression": "face_crop_path",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_performer_faces_status": {
          "name": "idx_performer_faces_status",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_performer_faces_faces_in_frame": {
          "name": "idx_performer_faces_faces_in_frame",
          "columns": [
            {
              "expression": "faces_in_frame",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_performer_faces_det_score": {
          "name": "idx_performer_faces_det_score",
          "columns": [
            {
              "expression": "detection_score",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.pipeline_step_events": {
      "name": "pipeline_step_events",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "step_id": {
          "name": "step_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "event_type": {
          "name": "event_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "event_data": {
          "name": "event_data",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_pipeline_step_events_step": {
          "name": "idx_pipeline_step_events_step",
          "columns": [
            {
              "expression": "step_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_pipeline_step_events_created": {
          "name": "idx_pipeline_step_events_created",
          "columns": [
            {
              "expression": "created_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "pipeline_step_events_step_id_pipeline_steps_id_fk": {
          "name": "pipeline_step_events_step_id_pipeline_steps_id_fk",
          "tableFrom": "pipeline_step_events",
          "tableTo": "pipeline_steps",
          "columnsFrom": [
            "step_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.pipeline_steps": {
      "name": "pipeline_steps",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "pipeline_id": {
          "name": "pipeline_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "step_type": {
          "name": "step_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "sequence_order": {
          "name": "sequence_order",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "depends_on": {
          "name": "depends_on",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false,
          "default": "'[]'::jsonb"
        },
        "resource_category": {
          "name": "resource_category",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'cpu'"
        },
        "vram_required": {
          "name": "vram_required",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "required_containers": {
          "name": "required_containers",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false,
          "default": "'[]'::jsonb"
        },
        "config": {
          "name": "config",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "progress": {
          "name": "progress",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "result": {
          "name": "result",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "error": {
          "name": "error",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "estimated_duration_ms": {
          "name": "estimated_duration_ms",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "started_at": {
          "name": "started_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "completed_at": {
          "name": "completed_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "duration_ms": {
          "name": "duration_ms",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_pipeline_steps_pipeline": {
          "name": "idx_pipeline_steps_pipeline",
          "columns": [
            {
              "expression": "pipeline_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_pipeline_steps_sequence": {
          "name": "idx_pipeline_steps_sequence",
          "columns": [
            {
              "expression": "pipeline_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "sequence_order",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_pipeline_steps_status": {
          "name": "idx_pipeline_steps_status",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "pipeline_steps_pipeline_id_pipelines_id_fk": {
          "name": "pipeline_steps_pipeline_id_pipelines_id_fk",
          "tableFrom": "pipeline_steps",
          "tableTo": "pipelines",
          "columnsFrom": [
            "pipeline_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.pipeline_templates": {
      "name": "pipeline_templates",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "display_name": {
          "name": "display_name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "steps": {
          "name": "steps",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true
        },
        "context_schema": {
          "name": "context_schema",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_pipeline_templates_name": {
          "name": "idx_pipeline_templates_name",
          "columns": [
            {
              "expression": "name",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "pipeline_templates_name_unique": {
          "name": "pipeline_templates_name_unique",
          "nullsNotDistinct": false,
          "columns": [
            "name"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.pipelines": {
      "name": "pipelines",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "priority": {
          "name": "priority",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 5
        },
        "context": {
          "name": "context",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "total_vram_required": {
          "name": "total_vram_required",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "estimated_duration_ms": {
          "name": "estimated_duration_ms",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "progress": {
          "name": "progress",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "current_step_id": {
          "name": "current_step_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "completed_steps": {
          "name": "completed_steps",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "total_steps": {
          "name": "total_steps",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "error": {
          "name": "error",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "retry_count": {
          "name": "retry_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "max_retries": {
          "name": "max_retries",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 3
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "queued_at": {
          "name": "queued_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "started_at": {
          "name": "started_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "completed_at": {
          "name": "completed_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "last_heartbeat": {
          "name": "last_heartbeat",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "running_on_node": {
          "name": "running_on_node",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_pipelines_status": {
          "name": "idx_pipelines_status",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_pipelines_priority": {
          "name": "idx_pipelines_priority",
          "columns": [
            {
              "expression": "priority",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "created_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_pipelines_heartbeat": {
          "name": "idx_pipelines_heartbeat",
          "columns": [
            {
              "expression": "last_heartbeat",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.playlist_videos": {
      "name": "playlist_videos",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "playlist_id": {
          "name": "playlist_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "media_id": {
          "name": "media_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "position": {
          "name": "position",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "added_at": {
          "name": "added_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_playlist_videos_playlist": {
          "name": "idx_playlist_videos_playlist",
          "columns": [
            {
              "expression": "playlist_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_playlist_videos_media": {
          "name": "idx_playlist_videos_media",
          "columns": [
            {
              "expression": "media_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_playlist_videos_unique": {
          "name": "idx_playlist_videos_unique",
          "columns": [
            {
              "expression": "playlist_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "media_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.playlist_views": {
      "name": "playlist_views",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "playlist_id": {
          "name": "playlist_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "session_id": {
          "name": "session_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_playlist_views_playlist": {
          "name": "idx_playlist_views_playlist",
          "columns": [
            {
              "expression": "playlist_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_playlist_views_unique": {
          "name": "idx_playlist_views_unique",
          "columns": [
            {
              "expression": "playlist_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "session_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.playlists": {
      "name": "playlists",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_public": {
          "name": "is_public",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "share_token": {
          "name": "share_token",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "thumbnail_media_id": {
          "name": "thumbnail_media_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "video_count": {
          "name": "video_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "total_duration_seconds": {
          "name": "total_duration_seconds",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "view_count": {
          "name": "view_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_playlists_user": {
          "name": "idx_playlists_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_playlists_public": {
          "name": "idx_playlists_public",
          "columns": [
            {
              "expression": "is_public",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_playlists_share_token": {
          "name": "idx_playlists_share_token",
          "columns": [
            {
              "expression": "share_token",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_playlists_user_name": {
          "name": "idx_playlists_user_name",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "name",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "playlists_share_token_unique": {
          "name": "playlists_share_token_unique",
          "nullsNotDistinct": false,
          "columns": [
            "share_token"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.pokes": {
      "name": "pokes",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "from_user_id": {
          "name": "from_user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "to_user_id": {
          "name": "to_user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "is_read": {
          "name": "is_read",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_pokes_to_user": {
          "name": "idx_pokes_to_user",
          "columns": [
            {
              "expression": "to_user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_pokes_from_user": {
          "name": "idx_pokes_from_user",
          "columns": [
            {
              "expression": "from_user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.privacy_settings": {
      "name": "privacy_settings",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "show_online_status": {
          "name": "show_online_status",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "show_currently_watching": {
          "name": "show_currently_watching",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "show_in_friend_activity": {
          "name": "show_in_friend_activity",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "anonymize_public_comments": {
          "name": "anonymize_public_comments",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "hide_public_reactions": {
          "name": "hide_public_reactions",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "hide_public_finishes": {
          "name": "hide_public_finishes",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "allow_friend_requests": {
          "name": "allow_friend_requests",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "close_friends_only_watching": {
          "name": "close_friends_only_watching",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_privacy_settings_user": {
          "name": "idx_privacy_settings_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "privacy_settings_user_id_users_id_fk": {
          "name": "privacy_settings_user_id_users_id_fk",
          "tableFrom": "privacy_settings",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "privacy_settings_user_id_unique": {
          "name": "privacy_settings_user_id_unique",
          "nullsNotDistinct": false,
          "columns": [
            "user_id"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.public_media": {
      "name": "public_media",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "path": {
          "name": "path",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "filename": {
          "name": "filename",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "category": {
          "name": "category",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "duration_seconds": {
          "name": "duration_seconds",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "quality": {
          "name": "quality",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "orientation": {
          "name": "orientation",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "thumbnail_path": {
          "name": "thumbnail_path",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "file_size": {
          "name": "file_size",
          "type": "bigint",
          "primaryKey": false,
          "notNull": false
        },
        "view_count": {
          "name": "view_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "upvote_count": {
          "name": "upvote_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "comment_count": {
          "name": "comment_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "finish_count": {
          "name": "finish_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "total_watch_time": {
          "name": "total_watch_time",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "is_locked": {
          "name": "is_locked",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "locked_at": {
          "name": "locked_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "locked_by": {
          "name": "locked_by",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "position": {
          "name": "position",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "uploader_id": {
          "name": "uploader_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_public_media_category": {
          "name": "idx_public_media_category",
          "columns": [
            {
              "expression": "category",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_public_media_path": {
          "name": "idx_public_media_path",
          "columns": [
            {
              "expression": "path",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_public_media_is_locked": {
          "name": "idx_public_media_is_locked",
          "columns": [
            {
              "expression": "is_locked",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_public_media_position": {
          "name": "idx_public_media_position",
          "columns": [
            {
              "expression": "position",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_public_media_uploader": {
          "name": "idx_public_media_uploader",
          "columns": [
            {
              "expression": "uploader_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_public_media_category_date": {
          "name": "idx_public_media_category_date",
          "columns": [
            {
              "expression": "category",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "created_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_public_media_orientation": {
          "name": "idx_public_media_orientation",
          "columns": [
            {
              "expression": "orientation",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_public_media_category_locked_date": {
          "name": "idx_public_media_category_locked_date",
          "columns": [
            {
              "expression": "category",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "is_locked",
              "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": {
        "public_media_path_unique": {
          "name": "public_media_path_unique",
          "nullsNotDistinct": false,
          "columns": [
            "path"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.public_media_performers": {
      "name": "public_media_performers",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "media_id": {
          "name": "media_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "performer_id": {
          "name": "performer_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "added_at": {
          "name": "added_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_public_media_performers_media": {
          "name": "idx_public_media_performers_media",
          "columns": [
            {
              "expression": "media_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_public_media_performers_performer": {
          "name": "idx_public_media_performers_performer",
          "columns": [
            {
              "expression": "performer_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_public_media_performers_unique": {
          "name": "idx_public_media_performers_unique",
          "columns": [
            {
              "expression": "media_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "performer_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.public_media_tags": {
      "name": "public_media_tags",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "media_id": {
          "name": "media_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "tag_id": {
          "name": "tag_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "added_at": {
          "name": "added_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_public_media_tags_media": {
          "name": "idx_public_media_tags_media",
          "columns": [
            {
              "expression": "media_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_public_media_tags_tag": {
          "name": "idx_public_media_tags_tag",
          "columns": [
            {
              "expression": "tag_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_public_media_tags_unique": {
          "name": "idx_public_media_tags_unique",
          "columns": [
            {
              "expression": "media_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "tag_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.published_inbox_files": {
      "name": "published_inbox_files",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "source_inbox_path": {
          "name": "source_inbox_path",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "filename": {
          "name": "filename",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "published_at": {
          "name": "published_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "published_to_path": {
          "name": "published_to_path",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "public_media_id": {
          "name": "public_media_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "file_type": {
          "name": "file_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {
        "idx_published_inbox_source": {
          "name": "idx_published_inbox_source",
          "columns": [
            {
              "expression": "source_inbox_path",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_published_inbox_file_type": {
          "name": "idx_published_inbox_file_type",
          "columns": [
            {
              "expression": "file_type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "published_inbox_files_public_media_id_public_media_id_fk": {
          "name": "published_inbox_files_public_media_id_public_media_id_fk",
          "tableFrom": "published_inbox_files",
          "tableTo": "public_media",
          "columnsFrom": [
            "public_media_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.rate_limits": {
      "name": "rate_limits",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "key": {
          "name": "key",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "count": {
          "name": "count",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 1
        },
        "reset_at": {
          "name": "reset_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {
        "idx_rate_limits_key": {
          "name": "idx_rate_limits_key",
          "columns": [
            {
              "expression": "key",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_rate_limits_reset_at": {
          "name": "idx_rate_limits_reset_at",
          "columns": [
            {
              "expression": "reset_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "rate_limits_key_unique": {
          "name": "rate_limits_key_unique",
          "nullsNotDistinct": false,
          "columns": [
            "key"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.resource_snapshots": {
      "name": "resource_snapshots",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "gpu_index": {
          "name": "gpu_index",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "gpu_name": {
          "name": "gpu_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "vram_used_mb": {
          "name": "vram_used_mb",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "vram_total_mb": {
          "name": "vram_total_mb",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "gpu_utilization": {
          "name": "gpu_utilization",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "gpu_temperature": {
          "name": "gpu_temperature",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "active_processes": {
          "name": "active_processes",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "pipeline_id": {
          "name": "pipeline_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "step_id": {
          "name": "step_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_resource_snapshots_created": {
          "name": "idx_resource_snapshots_created",
          "columns": [
            {
              "expression": "created_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_resource_snapshots_pipeline": {
          "name": "idx_resource_snapshots_pipeline",
          "columns": [
            {
              "expression": "pipeline_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.session_bans": {
      "name": "session_bans",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "session_id": {
          "name": "session_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "reason": {
          "name": "reason",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "banned_by": {
          "name": "banned_by",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_session_bans_session": {
          "name": "idx_session_bans_session",
          "columns": [
            {
              "expression": "session_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.sessions": {
      "name": "sessions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "last_seen_at": {
          "name": "last_seen_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "ip_address": {
          "name": "ip_address",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "user_agent": {
          "name": "user_agent",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "device_type": {
          "name": "device_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "browser": {
          "name": "browser",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "os": {
          "name": "os",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "country": {
          "name": "country",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "country_name": {
          "name": "country_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "region": {
          "name": "region",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "city": {
          "name": "city",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "timezone": {
          "name": "timezone",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "latitude": {
          "name": "latitude",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "longitude": {
          "name": "longitude",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "first_seen_at": {
          "name": "first_seen_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "visit_count": {
          "name": "visit_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 1
        }
      },
      "indexes": {
        "idx_sessions_user_id": {
          "name": "idx_sessions_user_id",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_sessions_country": {
          "name": "idx_sessions_country",
          "columns": [
            {
              "expression": "country",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.subscription_plans": {
      "name": "subscription_plans",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "display_name": {
          "name": "display_name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "price_cad": {
          "name": "price_cad",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "duration_days": {
          "name": "duration_days",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "is_active": {
          "name": "is_active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "sort_order": {
          "name": "sort_order",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "subscription_plans_name_unique": {
          "name": "subscription_plans_name_unique",
          "nullsNotDistinct": false,
          "columns": [
            "name"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.tag_categories": {
      "name": "tag_categories",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "display_order": {
          "name": "display_order",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_tag_categories_display_order": {
          "name": "idx_tag_categories_display_order",
          "columns": [
            {
              "expression": "display_order",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "tag_categories_name_unique": {
          "name": "tag_categories_name_unique",
          "nullsNotDistinct": false,
          "columns": [
            "name"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.tag_generation_jobs": {
      "name": "tag_generation_jobs",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "content_type": {
          "name": "content_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "content_ids": {
          "name": "content_ids",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true
        },
        "options": {
          "name": "options",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "results": {
          "name": "results",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "progress": {
          "name": "progress",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "current_item": {
          "name": "current_item",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "total_items": {
          "name": "total_items",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "error": {
          "name": "error",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "completed_at": {
          "name": "completed_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_tag_gen_status": {
          "name": "idx_tag_gen_status",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_tag_gen_content_type": {
          "name": "idx_tag_gen_content_type",
          "columns": [
            {
              "expression": "content_type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_tag_gen_created_at": {
          "name": "idx_tag_gen_created_at",
          "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.tags": {
      "name": "tags",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "category_id": {
          "name": "category_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "display_order": {
          "name": "display_order",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_tags_category": {
          "name": "idx_tags_category",
          "columns": [
            {
              "expression": "category_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_tags_display_order": {
          "name": "idx_tags_display_order",
          "columns": [
            {
              "expression": "display_order",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_tags_unique_name": {
          "name": "idx_tags_unique_name",
          "columns": [
            {
              "expression": "category_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "name",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.upload_invites": {
      "name": "upload_invites",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "code": {
          "name": "code",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "label": {
          "name": "label",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_by": {
          "name": "created_by",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'active'"
        },
        "max_uploads": {
          "name": "max_uploads",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "upload_count": {
          "name": "upload_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_upload_invites_code": {
          "name": "idx_upload_invites_code",
          "columns": [
            {
              "expression": "code",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_upload_invites_status": {
          "name": "idx_upload_invites_status",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_upload_invites_created_by": {
          "name": "idx_upload_invites_created_by",
          "columns": [
            {
              "expression": "created_by",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "upload_invites_code_unique": {
          "name": "upload_invites_code_unique",
          "nullsNotDistinct": false,
          "columns": [
            "code"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.upvotes": {
      "name": "upvotes",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "media_id": {
          "name": "media_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "session_id": {
          "name": "session_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_upvotes_unique": {
          "name": "idx_upvotes_unique",
          "columns": [
            {
              "expression": "media_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "session_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_upvotes_media": {
          "name": "idx_upvotes_media",
          "columns": [
            {
              "expression": "media_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.user_achievements": {
      "name": "user_achievements",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "achievement_id": {
          "name": "achievement_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "unlocked_at": {
          "name": "unlocked_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true
        },
        "progress": {
          "name": "progress",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "notified": {
          "name": "notified",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        }
      },
      "indexes": {
        "idx_user_achievements_user": {
          "name": "idx_user_achievements_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_user_achievements_unique": {
          "name": "idx_user_achievements_unique",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "achievement_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.user_blocks": {
      "name": "user_blocks",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "blocked_user_id": {
          "name": "blocked_user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_user_blocks_unique": {
          "name": "idx_user_blocks_unique",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "blocked_user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_user_blocks_user": {
          "name": "idx_user_blocks_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.user_daily_activity": {
      "name": "user_daily_activity",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "activity_date": {
          "name": "activity_date",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "watch_time_seconds": {
          "name": "watch_time_seconds",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "videos_watched": {
          "name": "videos_watched",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "first_activity_hour": {
          "name": "first_activity_hour",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_user_daily_activity_unique": {
          "name": "idx_user_daily_activity_unique",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "activity_date",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.user_finishes": {
      "name": "user_finishes",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "media_id": {
          "name": "media_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "session_id": {
          "name": "session_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {
        "idx_user_finishes_user": {
          "name": "idx_user_finishes_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_user_finishes_date": {
          "name": "idx_user_finishes_date",
          "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_gallery_images": {
      "name": "user_gallery_images",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "filename": {
          "name": "filename",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "original_filename": {
          "name": "original_filename",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "position": {
          "name": "position",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "uploaded_at": {
          "name": "uploaded_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_user_gallery_user": {
          "name": "idx_user_gallery_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_user_gallery_position": {
          "name": "idx_user_gallery_position",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "position",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.user_presence": {
      "name": "user_presence",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "is_online": {
          "name": "is_online",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "current_media_id": {
          "name": "current_media_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "last_activity_at": {
          "name": "last_activity_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "last_video_change_at": {
          "name": "last_video_change_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_user_presence_online": {
          "name": "idx_user_presence_online",
          "columns": [
            {
              "expression": "is_online",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_user_presence_user": {
          "name": "idx_user_presence_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "user_presence_user_id_unique": {
          "name": "user_presence_user_id_unique",
          "nullsNotDistinct": false,
          "columns": [
            "user_id"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.user_social_links": {
      "name": "user_social_links",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "platform": {
          "name": "platform",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "url": {
          "name": "url",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "display_name": {
          "name": "display_name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "position": {
          "name": "position",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_user_social_links_user": {
          "name": "idx_user_social_links_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_user_social_links_position": {
          "name": "idx_user_social_links_position",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "position",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.user_stats": {
      "name": "user_stats",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "total_watch_time_seconds": {
          "name": "total_watch_time_seconds",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "total_videos_watched": {
          "name": "total_videos_watched",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "total_upvotes_given": {
          "name": "total_upvotes_given",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "total_comments_made": {
          "name": "total_comments_made",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "total_finishes": {
          "name": "total_finishes",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "current_day_streak": {
          "name": "current_day_streak",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "longest_day_streak": {
          "name": "longest_day_streak",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "last_active_date": {
          "name": "last_active_date",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "longest_single_session": {
          "name": "longest_single_session",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "categories_completed": {
          "name": "categories_completed",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "night_owl_count": {
          "name": "night_owl_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "early_bird_count": {
          "name": "early_bird_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "user_stats_user_id_unique": {
          "name": "user_stats_user_id_unique",
          "nullsNotDistinct": false,
          "columns": [
            "user_id"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.user_subscriptions": {
      "name": "user_subscriptions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "plan_id": {
          "name": "plan_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'inactive'"
        },
        "start_date": {
          "name": "start_date",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "end_date": {
          "name": "end_date",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "grace_period_end_date": {
          "name": "grace_period_end_date",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "last_payment_id": {
          "name": "last_payment_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "auto_renew": {
          "name": "auto_renew",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "notes": {
          "name": "notes",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_user_subscriptions_user": {
          "name": "idx_user_subscriptions_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_user_subscriptions_status": {
          "name": "idx_user_subscriptions_status",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_user_subscriptions_end_date": {
          "name": "idx_user_subscriptions_end_date",
          "columns": [
            {
              "expression": "end_date",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "user_subscriptions_user_id_users_id_fk": {
          "name": "user_subscriptions_user_id_users_id_fk",
          "tableFrom": "user_subscriptions",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "user_subscriptions_plan_id_subscription_plans_id_fk": {
          "name": "user_subscriptions_plan_id_subscription_plans_id_fk",
          "tableFrom": "user_subscriptions",
          "tableTo": "subscription_plans",
          "columnsFrom": [
            "plan_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.user_tag_preferences": {
      "name": "user_tag_preferences",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "tag_id": {
          "name": "tag_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "saved_at": {
          "name": "saved_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_user_tag_preferences_user": {
          "name": "idx_user_tag_preferences_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_user_tag_preferences_tag": {
          "name": "idx_user_tag_preferences_tag",
          "columns": [
            {
              "expression": "tag_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_user_tag_preferences_unique": {
          "name": "idx_user_tag_preferences_unique",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "tag_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.user_upload_suggested_tags": {
      "name": "user_upload_suggested_tags",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "upload_id": {
          "name": "upload_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "tag_id": {
          "name": "tag_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "suggested_at": {
          "name": "suggested_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_user_upload_suggested_tags_upload": {
          "name": "idx_user_upload_suggested_tags_upload",
          "columns": [
            {
              "expression": "upload_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_user_upload_suggested_tags_tag": {
          "name": "idx_user_upload_suggested_tags_tag",
          "columns": [
            {
              "expression": "tag_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_user_upload_suggested_tags_unique": {
          "name": "idx_user_upload_suggested_tags_unique",
          "columns": [
            {
              "expression": "upload_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "tag_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.user_uploads": {
      "name": "user_uploads",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "filename": {
          "name": "filename",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "original_filename": {
          "name": "original_filename",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "path": {
          "name": "path",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "duration_seconds": {
          "name": "duration_seconds",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "quality": {
          "name": "quality",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "orientation": {
          "name": "orientation",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "file_size": {
          "name": "file_size",
          "type": "bigint",
          "primaryKey": false,
          "notNull": false
        },
        "thumbnail_path": {
          "name": "thumbnail_path",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "reviewed_by": {
          "name": "reviewed_by",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "reviewed_at": {
          "name": "reviewed_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "review_notes": {
          "name": "review_notes",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "public_media_id": {
          "name": "public_media_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "upload_invite_id": {
          "name": "upload_invite_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_user_uploads_user": {
          "name": "idx_user_uploads_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_user_uploads_status": {
          "name": "idx_user_uploads_status",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_user_uploads_created": {
          "name": "idx_user_uploads_created",
          "columns": [
            {
              "expression": "created_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_user_uploads_invite": {
          "name": "idx_user_uploads_invite",
          "columns": [
            {
              "expression": "upload_invite_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.users": {
      "name": "users",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "username": {
          "name": "username",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "email": {
          "name": "email",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "password_hash": {
          "name": "password_hash",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "role": {
          "name": "role",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'user'"
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "email_verified": {
          "name": "email_verified",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "linked_session_id": {
          "name": "linked_session_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "approved_at": {
          "name": "approved_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "approved_by": {
          "name": "approved_by",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "last_login_at": {
          "name": "last_login_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "is_trusted": {
          "name": "is_trusted",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "max_upload_duration_seconds": {
          "name": "max_upload_duration_seconds",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 60
        },
        "auto_accept_uploads": {
          "name": "auto_accept_uploads",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "trusted_at": {
          "name": "trusted_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "trusted_by": {
          "name": "trusted_by",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "default_playlist_id": {
          "name": "default_playlist_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "social_links_public": {
          "name": "social_links_public",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "subscription_status": {
          "name": "subscription_status",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'none'"
        },
        "subscription_plan_id": {
          "name": "subscription_plan_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "subscription_end_date": {
          "name": "subscription_end_date",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "lifetime_member": {
          "name": "lifetime_member",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "total_paid_cad": {
          "name": "total_paid_cad",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "last_moderation_action": {
          "name": "last_moderation_action",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_users_email": {
          "name": "idx_users_email",
          "columns": [
            {
              "expression": "email",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_users_username": {
          "name": "idx_users_username",
          "columns": [
            {
              "expression": "username",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_users_status": {
          "name": "idx_users_status",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_users_trusted": {
          "name": "idx_users_trusted",
          "columns": [
            {
              "expression": "is_trusted",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_users_subscription_status": {
          "name": "idx_users_subscription_status",
          "columns": [
            {
              "expression": "subscription_status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "users_username_unique": {
          "name": "users_username_unique",
          "nullsNotDistinct": false,
          "columns": [
            "username"
          ]
        },
        "users_email_unique": {
          "name": "users_email_unique",
          "nullsNotDistinct": false,
          "columns": [
            "email"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.video_digests": {
      "name": "video_digests",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "video_id": {
          "name": "video_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "job_id": {
          "name": "job_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "progress": {
          "name": "progress",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "frame_count": {
          "name": "frame_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "config": {
          "name": "config",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "frame_analyses": {
          "name": "frame_analyses",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "transcript": {
          "name": "transcript",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "tags": {
          "name": "tags",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "suggested_clips": {
          "name": "suggested_clips",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "ad_cut_spec": {
          "name": "ad_cut_spec",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "stage_results": {
          "name": "stage_results",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "started_at": {
          "name": "started_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "completed_at": {
          "name": "completed_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "error": {
          "name": "error",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_video_digests_video": {
          "name": "idx_video_digests_video",
          "columns": [
            {
              "expression": "video_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_video_digests_status": {
          "name": "idx_video_digests_status",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_video_digests_created": {
          "name": "idx_video_digests_created",
          "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.video_ocr_results": {
      "name": "video_ocr_results",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "digest_id": {
          "name": "digest_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "video_id": {
          "name": "video_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "frame_index": {
          "name": "frame_index",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "timestamp": {
          "name": "timestamp",
          "type": "real",
          "primaryKey": false,
          "notNull": true
        },
        "extracted_text": {
          "name": "extracted_text",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "confidence": {
          "name": "confidence",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "text_type": {
          "name": "text_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "source_frame": {
          "name": "source_frame",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_video_ocr_results_digest": {
          "name": "idx_video_ocr_results_digest",
          "columns": [
            {
              "expression": "digest_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_video_ocr_results_video": {
          "name": "idx_video_ocr_results_video",
          "columns": [
            {
              "expression": "video_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.video_reactions": {
      "name": "video_reactions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "media_id": {
          "name": "media_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "reaction_type": {
          "name": "reaction_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "video_timestamp": {
          "name": "video_timestamp",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {
        "idx_video_reactions_user_media_type": {
          "name": "idx_video_reactions_user_media_type",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "media_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "reaction_type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_video_reactions_media_timestamp": {
          "name": "idx_video_reactions_media_timestamp",
          "columns": [
            {
              "expression": "media_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "video_timestamp",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_video_reactions_media": {
          "name": "idx_video_reactions_media",
          "columns": [
            {
              "expression": "media_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_video_reactions_created": {
          "name": "idx_video_reactions_created",
          "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.video_recommendations": {
      "name": "video_recommendations",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "from_user_id": {
          "name": "from_user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "to_user_id": {
          "name": "to_user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "media_id": {
          "name": "media_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "message": {
          "name": "message",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_read": {
          "name": "is_read",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_video_recommendations_to_user": {
          "name": "idx_video_recommendations_to_user",
          "columns": [
            {
              "expression": "to_user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_video_recommendations_from_user": {
          "name": "idx_video_recommendations_from_user",
          "columns": [
            {
              "expression": "from_user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_video_recommendations_media": {
          "name": "idx_video_recommendations_media",
          "columns": [
            {
              "expression": "media_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.video_scene_cuts": {
      "name": "video_scene_cuts",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "video_id": {
          "name": "video_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "cuts": {
          "name": "cuts",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true
        },
        "scene_count": {
          "name": "scene_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "duration": {
          "name": "duration",
          "type": "real",
          "primaryKey": false,
          "notNull": true
        },
        "detector": {
          "name": "detector",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'content'"
        },
        "threshold": {
          "name": "threshold",
          "type": "real",
          "primaryKey": false,
          "notNull": true,
          "default": 27
        },
        "transnet_cuts": {
          "name": "transnet_cuts",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "pyscenedetect_cuts": {
          "name": "pyscenedetect_cuts",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "clip_cuts": {
          "name": "clip_cuts",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "merged_cuts_detailed": {
          "name": "merged_cuts_detailed",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "merge_strategy": {
          "name": "merge_strategy",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'weighted'"
        },
        "tolerance_seconds": {
          "name": "tolerance_seconds",
          "type": "real",
          "primaryKey": false,
          "notNull": false,
          "default": 0.75
        },
        "detectors_used": {
          "name": "detectors_used",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "processing_time_ms": {
          "name": "processing_time_ms",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_video_scene_cuts_video": {
          "name": "idx_video_scene_cuts_video",
          "columns": [
            {
              "expression": "video_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.video_segments": {
      "name": "video_segments",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "digest_id": {
          "name": "digest_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "video_id": {
          "name": "video_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "segment_type": {
          "name": "segment_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "start_time": {
          "name": "start_time",
          "type": "real",
          "primaryKey": false,
          "notNull": true
        },
        "end_time": {
          "name": "end_time",
          "type": "real",
          "primaryKey": false,
          "notNull": true
        },
        "duration": {
          "name": "duration",
          "type": "real",
          "primaryKey": false,
          "notNull": true
        },
        "tags": {
          "name": "tags",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "transcript_snippet": {
          "name": "transcript_snippet",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "vocal_category": {
          "name": "vocal_category",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "position_change": {
          "name": "position_change",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "dominant_position": {
          "name": "dominant_position",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "interest_score": {
          "name": "interest_score",
          "type": "real",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "has_eye_contact": {
          "name": "has_eye_contact",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "has_full_sentence": {
          "name": "has_full_sentence",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "is_climax_moment": {
          "name": "is_climax_moment",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "captioned": {
          "name": "captioned",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "caption_text": {
          "name": "caption_text",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "keyframe_path": {
          "name": "keyframe_path",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "keyframe_timestamp": {
          "name": "keyframe_timestamp",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "is_included": {
          "name": "is_included",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "sequence_order": {
          "name": "sequence_order",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "is_hook": {
          "name": "is_hook",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "include_in_clips": {
          "name": "include_in_clips",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_video_segments_digest": {
          "name": "idx_video_segments_digest",
          "columns": [
            {
              "expression": "digest_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_video_segments_video": {
          "name": "idx_video_segments_video",
          "columns": [
            {
              "expression": "video_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_video_segments_type": {
          "name": "idx_video_segments_type",
          "columns": [
            {
              "expression": "segment_type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_video_segments_time": {
          "name": "idx_video_segments_time",
          "columns": [
            {
              "expression": "video_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "start_time",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_video_segments_included": {
          "name": "idx_video_segments_included",
          "columns": [
            {
              "expression": "digest_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "is_included",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_video_segments_sequence": {
          "name": "idx_video_segments_sequence",
          "columns": [
            {
              "expression": "digest_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "sequence_order",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_video_segments_clips": {
          "name": "idx_video_segments_clips",
          "columns": [
            {
              "expression": "digest_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "include_in_clips",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.video_tag_timeline": {
      "name": "video_tag_timeline",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "video_id": {
          "name": "video_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "digest_id": {
          "name": "digest_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "timestamp": {
          "name": "timestamp",
          "type": "real",
          "primaryKey": false,
          "notNull": true
        },
        "tags": {
          "name": "tags",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true
        },
        "dominant_position": {
          "name": "dominant_position",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "performer_count": {
          "name": "performer_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "intensity": {
          "name": "intensity",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "has_dialogue": {
          "name": "has_dialogue",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "has_eye_contact": {
          "name": "has_eye_contact",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "frame_path": {
          "name": "frame_path",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_video_tag_timeline_video": {
          "name": "idx_video_tag_timeline_video",
          "columns": [
            {
              "expression": "video_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_video_tag_timeline_digest": {
          "name": "idx_video_tag_timeline_digest",
          "columns": [
            {
              "expression": "digest_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_video_tag_timeline_timestamp": {
          "name": "idx_video_tag_timeline_timestamp",
          "columns": [
            {
              "expression": "video_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "timestamp",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_video_tag_timeline_position": {
          "name": "idx_video_tag_timeline_position",
          "columns": [
            {
              "expression": "dominant_position",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.video_tags": {
      "name": "video_tags",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "video_id": {
          "name": "video_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "tag_id": {
          "name": "tag_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "confidence": {
          "name": "confidence",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "source": {
          "name": "source",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'manual'"
        },
        "digest_id": {
          "name": "digest_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_video_tags_video": {
          "name": "idx_video_tags_video",
          "columns": [
            {
              "expression": "video_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_video_tags_tag": {
          "name": "idx_video_tags_tag",
          "columns": [
            {
              "expression": "tag_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_video_tags_source": {
          "name": "idx_video_tags_source",
          "columns": [
            {
              "expression": "source",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_video_tags_unique": {
          "name": "idx_video_tags_unique",
          "columns": [
            {
              "expression": "video_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "tag_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.videos": {
      "name": "videos",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "path": {
          "name": "path",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "filename": {
          "name": "filename",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "producer": {
          "name": "producer",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "creator": {
          "name": "creator",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "title": {
          "name": "title",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "duration_seconds": {
          "name": "duration_seconds",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "quality": {
          "name": "quality",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "orientation": {
          "name": "orientation",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "has_audio": {
          "name": "has_audio",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "file_size": {
          "name": "file_size",
          "type": "bigint",
          "primaryKey": false,
          "notNull": false
        },
        "file_hash": {
          "name": "file_hash",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "width": {
          "name": "width",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "height": {
          "name": "height",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "last_validated": {
          "name": "last_validated",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "is_valid": {
          "name": "is_valid",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "thumbnail_path": {
          "name": "thumbnail_path",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "tags": {
          "name": "tags",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "directory_type": {
          "name": "directory_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "public_view_count": {
          "name": "public_view_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "public_upvote_count": {
          "name": "public_upvote_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "public_comment_count": {
          "name": "public_comment_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "public_completion_count": {
          "name": "public_completion_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "public_total_watch_time": {
          "name": "public_total_watch_time",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "moved_from_public_at": {
          "name": "moved_from_public_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "original_filename": {
          "name": "original_filename",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "original_path": {
          "name": "original_path",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "standardized_at": {
          "name": "standardized_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_orientation": {
          "name": "idx_orientation",
          "columns": [
            {
              "expression": "orientation",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_producer": {
          "name": "idx_producer",
          "columns": [
            {
              "expression": "producer",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_is_valid": {
          "name": "idx_is_valid",
          "columns": [
            {
              "expression": "is_valid",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_directory_type": {
          "name": "idx_directory_type",
          "columns": [
            {
              "expression": "directory_type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_videos_fingerprint": {
          "name": "idx_videos_fingerprint",
          "columns": [
            {
              "expression": "duration_seconds",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "file_size",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "width",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "height",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_videos_directory_valid_orientation": {
          "name": "idx_videos_directory_valid_orientation",
          "columns": [
            {
              "expression": "directory_type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "is_valid",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "orientation",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "videos_path_unique": {
          "name": "videos_path_unique",
          "nullsNotDistinct": false,
          "columns": [
            "path"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.views": {
      "name": "views",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "media_id": {
          "name": "media_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "session_id": {
          "name": "session_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "watch_time_seconds": {
          "name": "watch_time_seconds",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "last_updated": {
          "name": "last_updated",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_views_unique": {
          "name": "idx_views_unique",
          "columns": [
            {
              "expression": "media_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "session_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_views_media": {
          "name": "idx_views_media",
          "columns": [
            {
              "expression": "media_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.watch_party_chat_messages": {
      "name": "watch_party_chat_messages",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "party_id": {
          "name": "party_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "content": {
          "name": "content",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_watch_party_chat_party": {
          "name": "idx_watch_party_chat_party",
          "columns": [
            {
              "expression": "party_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_watch_party_chat_created": {
          "name": "idx_watch_party_chat_created",
          "columns": [
            {
              "expression": "created_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "watch_party_chat_messages_party_id_watch_party_sessions_id_fk": {
          "name": "watch_party_chat_messages_party_id_watch_party_sessions_id_fk",
          "tableFrom": "watch_party_chat_messages",
          "tableTo": "watch_party_sessions",
          "columnsFrom": [
            "party_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "watch_party_chat_messages_user_id_users_id_fk": {
          "name": "watch_party_chat_messages_user_id_users_id_fk",
          "tableFrom": "watch_party_chat_messages",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.watch_party_invites": {
      "name": "watch_party_invites",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "party_id": {
          "name": "party_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "from_user_id": {
          "name": "from_user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "to_user_id": {
          "name": "to_user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'pending'"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "responded_at": {
          "name": "responded_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_watch_party_invites_party": {
          "name": "idx_watch_party_invites_party",
          "columns": [
            {
              "expression": "party_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_watch_party_invites_to_user": {
          "name": "idx_watch_party_invites_to_user",
          "columns": [
            {
              "expression": "to_user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_watch_party_invites_from_user": {
          "name": "idx_watch_party_invites_from_user",
          "columns": [
            {
              "expression": "from_user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_watch_party_invites_status": {
          "name": "idx_watch_party_invites_status",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "watch_party_invites_party_id_watch_party_sessions_id_fk": {
          "name": "watch_party_invites_party_id_watch_party_sessions_id_fk",
          "tableFrom": "watch_party_invites",
          "tableTo": "watch_party_sessions",
          "columnsFrom": [
            "party_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "watch_party_invites_from_user_id_users_id_fk": {
          "name": "watch_party_invites_from_user_id_users_id_fk",
          "tableFrom": "watch_party_invites",
          "tableTo": "users",
          "columnsFrom": [
            "from_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "watch_party_invites_to_user_id_users_id_fk": {
          "name": "watch_party_invites_to_user_id_users_id_fk",
          "tableFrom": "watch_party_invites",
          "tableTo": "users",
          "columnsFrom": [
            "to_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.watch_party_participants": {
      "name": "watch_party_participants",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "party_id": {
          "name": "party_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "is_connected": {
          "name": "is_connected",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "is_kicked": {
          "name": "is_kicked",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "joined_at": {
          "name": "joined_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "left_at": {
          "name": "left_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_watch_party_participants_party": {
          "name": "idx_watch_party_participants_party",
          "columns": [
            {
              "expression": "party_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_watch_party_participants_user": {
          "name": "idx_watch_party_participants_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_watch_party_participants_unique": {
          "name": "idx_watch_party_participants_unique",
          "columns": [
            {
              "expression": "party_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "watch_party_participants_party_id_watch_party_sessions_id_fk": {
          "name": "watch_party_participants_party_id_watch_party_sessions_id_fk",
          "tableFrom": "watch_party_participants",
          "tableTo": "watch_party_sessions",
          "columnsFrom": [
            "party_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "watch_party_participants_user_id_users_id_fk": {
          "name": "watch_party_participants_user_id_users_id_fk",
          "tableFrom": "watch_party_participants",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.watch_party_reactions": {
      "name": "watch_party_reactions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "party_id": {
          "name": "party_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "reaction_type": {
          "name": "reaction_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "video_timestamp": {
          "name": "video_timestamp",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "idx_watch_party_reactions_party": {
          "name": "idx_watch_party_reactions_party",
          "columns": [
            {
              "expression": "party_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_watch_party_reactions_user": {
          "name": "idx_watch_party_reactions_user",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "watch_party_reactions_party_id_watch_party_sessions_id_fk": {
          "name": "watch_party_reactions_party_id_watch_party_sessions_id_fk",
          "tableFrom": "watch_party_reactions",
          "tableTo": "watch_party_sessions",
          "columnsFrom": [
            "party_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "watch_party_reactions_user_id_users_id_fk": {
          "name": "watch_party_reactions_user_id_users_id_fk",
          "tableFrom": "watch_party_reactions",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.watch_party_sessions": {
      "name": "watch_party_sessions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "host_id": {
          "name": "host_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "media_id": {
          "name": "media_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "invite_code": {
          "name": "invite_code",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'waiting'"
        },
        "current_time": {
          "name": "current_time",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "is_playing": {
          "name": "is_playing",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "max_participants": {
          "name": "max_participants",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 20
        },
        "allow_chat": {
          "name": "allow_chat",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "started_at": {
          "name": "started_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "ended_at": {
          "name": "ended_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "summary_stats": {
          "name": "summary_stats",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "idx_watch_party_sessions_host": {
          "name": "idx_watch_party_sessions_host",
          "columns": [
            {
              "expression": "host_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_watch_party_sessions_invite": {
          "name": "idx_watch_party_sessions_invite",
          "columns": [
            {
              "expression": "invite_code",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_watch_party_sessions_status": {
          "name": "idx_watch_party_sessions_status",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "idx_watch_party_sessions_created": {
          "name": "idx_watch_party_sessions_created",
          "columns": [
            {
              "expression": "created_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "watch_party_sessions_host_id_users_id_fk": {
          "name": "watch_party_sessions_host_id_users_id_fk",
          "tableFrom": "watch_party_sessions",
          "tableTo": "users",
          "columnsFrom": [
            "host_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "watch_party_sessions_media_id_public_media_id_fk": {
          "name": "watch_party_sessions_media_id_public_media_id_fk",
          "tableFrom": "watch_party_sessions",
          "tableTo": "public_media",
          "columnsFrom": [
            "media_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "watch_party_sessions_invite_code_unique": {
          "name": "watch_party_sessions_invite_code_unique",
          "nullsNotDistinct": false,
          "columns": [
            "invite_code"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    }
  },
  "enums": {},
  "schemas": {},
  "sequences": {},
  "roles": {},
  "policies": {},
  "views": {},
  "_meta": {
    "columns": {},
    "schemas": {},
    "tables": {}
  }
}