Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

93.6 KB
Raw Blame
{
  "id": "8d6bb1b0-9d59-4de0-9dc1-b072e6950ce9",
  "prevId": "d7780f73-1071-4c51-a9dc-32eceb0d9c08",
  "version": "7",
  "dialect": "postgresql",
  "tables": {
    "public.account": {
      "name": "account",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "accountId": {
          "name": "accountId",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "providerId": {
          "name": "providerId",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "userId": {
          "name": "userId",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "accessToken": {
          "name": "accessToken",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "refreshToken": {
          "name": "refreshToken",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "idToken": {
          "name": "idToken",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "accessTokenExpiresAt": {
          "name": "accessTokenExpiresAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "refreshTokenExpiresAt": {
          "name": "refreshTokenExpiresAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "scope": {
          "name": "scope",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "password": {
          "name": "password",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "createdAt": {
          "name": "createdAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "updatedAt": {
          "name": "updatedAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {},
      "foreignKeys": {
        "account_userId_user_id_fk": {
          "name": "account_userId_user_id_fk",
          "tableFrom": "account",
          "tableTo": "user",
          "columnsFrom": [
            "userId"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.active_sessions": {
      "name": "active_sessions",
      "schema": "",
      "columns": {
        "session_id": {
          "name": "session_id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "site_id": {
          "name": "site_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "start_time": {
          "name": "start_time",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "last_activity": {
          "name": "last_activity",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.agent_regions": {
      "name": "agent_regions",
      "schema": "",
      "columns": {
        "code": {
          "name": "code",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "endpoint_url": {
          "name": "endpoint_url",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "enabled": {
          "name": "enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "last_health_check": {
          "name": "last_health_check",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "is_healthy": {
          "name": "is_healthy",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.apikey": {
      "name": "apikey",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "start": {
          "name": "start",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "prefix": {
          "name": "prefix",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "key": {
          "name": "key",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "referenceId": {
          "name": "referenceId",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "refillInterval": {
          "name": "refillInterval",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "refillAmount": {
          "name": "refillAmount",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "lastRefillAt": {
          "name": "lastRefillAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "enabled": {
          "name": "enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "rateLimitEnabled": {
          "name": "rateLimitEnabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "rateLimitTimeWindow": {
          "name": "rateLimitTimeWindow",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "rateLimitMax": {
          "name": "rateLimitMax",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "requestCount": {
          "name": "requestCount",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "remaining": {
          "name": "remaining",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "lastRequest": {
          "name": "lastRequest",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "expiresAt": {
          "name": "expiresAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "createdAt": {
          "name": "createdAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "updatedAt": {
          "name": "updatedAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "configId": {
          "name": "configId",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "permissions": {
          "name": "permissions",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "metadata": {
          "name": "metadata",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "apikey_referenceId_user_id_fk": {
          "name": "apikey_referenceId_user_id_fk",
          "tableFrom": "apikey",
          "tableTo": "user",
          "columnsFrom": [
            "referenceId"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.cancellation_feedback": {
      "name": "cancellation_feedback",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "organization_id": {
          "name": "organization_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "reason": {
          "name": "reason",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "reason_details": {
          "name": "reason_details",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "retention_offer_shown": {
          "name": "retention_offer_shown",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "retention_offer_accepted": {
          "name": "retention_offer_accepted",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "outcome": {
          "name": "outcome",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "plan_name_at_cancellation": {
          "name": "plan_name_at_cancellation",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "monthly_event_count_at_cancellation": {
          "name": "monthly_event_count_at_cancellation",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.dashboards": {
      "name": "dashboards",
      "schema": "",
      "columns": {
        "dashboard_id": {
          "name": "dashboard_id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "site_id": {
          "name": "site_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "config": {
          "name": "config",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'{\"cards\":[]}'::jsonb"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "dashboards_site_id_sites_site_id_fk": {
          "name": "dashboards_site_id_sites_site_id_fk",
          "tableFrom": "dashboards",
          "tableTo": "sites",
          "columnsFrom": [
            "site_id"
          ],
          "columnsTo": [
            "site_id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "dashboards_user_id_user_id_fk": {
          "name": "dashboards_user_id_user_id_fk",
          "tableFrom": "dashboards",
          "tableTo": "user",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.experiments": {
      "name": "experiments",
      "schema": "",
      "columns": {
        "experiment_id": {
          "name": "experiment_id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "site_id": {
          "name": "site_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "feature_flag_id": {
          "name": "feature_flag_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "primary_goal_id": {
          "name": "primary_goal_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "hypothesis": {
          "name": "hypothesis",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'draft'"
        },
        "winning_variant": {
          "name": "winning_variant",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "started_at": {
          "name": "started_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "ended_at": {
          "name": "ended_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "experiments_site_idx": {
          "name": "experiments_site_idx",
          "columns": [
            {
              "expression": "site_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "experiments_feature_flag_idx": {
          "name": "experiments_feature_flag_idx",
          "columns": [
            {
              "expression": "feature_flag_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "experiments_primary_goal_idx": {
          "name": "experiments_primary_goal_idx",
          "columns": [
            {
              "expression": "primary_goal_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "experiments_site_id_sites_site_id_fk": {
          "name": "experiments_site_id_sites_site_id_fk",
          "tableFrom": "experiments",
          "tableTo": "sites",
          "columnsFrom": [
            "site_id"
          ],
          "columnsTo": [
            "site_id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "experiments_feature_flag_id_feature_flags_flag_id_fk": {
          "name": "experiments_feature_flag_id_feature_flags_flag_id_fk",
          "tableFrom": "experiments",
          "tableTo": "feature_flags",
          "columnsFrom": [
            "feature_flag_id"
          ],
          "columnsTo": [
            "flag_id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "experiments_primary_goal_id_goals_goal_id_fk": {
          "name": "experiments_primary_goal_id_goals_goal_id_fk",
          "tableFrom": "experiments",
          "tableTo": "goals",
          "columnsFrom": [
            "primary_goal_id"
          ],
          "columnsTo": [
            "goal_id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "experiments_site_flag_unique": {
          "name": "experiments_site_flag_unique",
          "nullsNotDistinct": false,
          "columns": [
            "site_id",
            "feature_flag_id"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {
        "experiments_status_check": {
          "name": "experiments_status_check",
          "value": "status IN ('draft', 'running', 'paused', 'completed')"
        }
      },
      "isRLSEnabled": false
    },
    "public.feature_flags": {
      "name": "feature_flags",
      "schema": "",
      "columns": {
        "flag_id": {
          "name": "flag_id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "site_id": {
          "name": "site_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "key": {
          "name": "key",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "enabled": {
          "name": "enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "runtime": {
          "name": "runtime",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'client'"
        },
        "flag_type": {
          "name": "flag_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'boolean'"
        },
        "payload": {
          "name": "payload",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "variants": {
          "name": "variants",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "rollout_percentage": {
          "name": "rollout_percentage",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 100
        },
        "rules": {
          "name": "rules",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "condition_sets": {
          "name": "condition_sets",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "salt": {
          "name": "salt",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "md5(random()::text || clock_timestamp()::text)"
        },
        "version": {
          "name": "version",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 1
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "feature_flags_site_idx": {
          "name": "feature_flags_site_idx",
          "columns": [
            {
              "expression": "site_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "feature_flags_site_id_sites_site_id_fk": {
          "name": "feature_flags_site_id_sites_site_id_fk",
          "tableFrom": "feature_flags",
          "tableTo": "sites",
          "columnsFrom": [
            "site_id"
          ],
          "columnsTo": [
            "site_id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "feature_flags_site_key_unique": {
          "name": "feature_flags_site_key_unique",
          "nullsNotDistinct": false,
          "columns": [
            "site_id",
            "key"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {
        "feature_flags_rollout_check": {
          "name": "feature_flags_rollout_check",
          "value": "rollout_percentage >= 0 AND rollout_percentage <= 100"
        },
        "feature_flags_runtime_check": {
          "name": "feature_flags_runtime_check",
          "value": "runtime IN ('client', 'server', 'both')"
        },
        "feature_flags_type_check": {
          "name": "feature_flags_type_check",
          "value": "flag_type IN ('boolean', 'multivariate', 'remote_config')"
        }
      },
      "isRLSEnabled": false
    },
    "public.funnels": {
      "name": "funnels",
      "schema": "",
      "columns": {
        "report_id": {
          "name": "report_id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "site_id": {
          "name": "site_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "data": {
          "name": "data",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "funnels_site_id_sites_site_id_fk": {
          "name": "funnels_site_id_sites_site_id_fk",
          "tableFrom": "funnels",
          "tableTo": "sites",
          "columnsFrom": [
            "site_id"
          ],
          "columnsTo": [
            "site_id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "funnels_user_id_user_id_fk": {
          "name": "funnels_user_id_user_id_fk",
          "tableFrom": "funnels",
          "tableTo": "user",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.goals": {
      "name": "goals",
      "schema": "",
      "columns": {
        "goal_id": {
          "name": "goal_id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "site_id": {
          "name": "site_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "goal_type": {
          "name": "goal_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "config": {
          "name": "config",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "goals_site_id_sites_site_id_fk": {
          "name": "goals_site_id_sites_site_id_fk",
          "tableFrom": "goals",
          "tableTo": "sites",
          "columnsFrom": [
            "site_id"
          ],
          "columnsTo": [
            "site_id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.gsc_connections": {
      "name": "gsc_connections",
      "schema": "",
      "columns": {
        "site_id": {
          "name": "site_id",
          "type": "integer",
          "primaryKey": true,
          "notNull": true
        },
        "access_token": {
          "name": "access_token",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "refresh_token": {
          "name": "refresh_token",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "gsc_property_url": {
          "name": "gsc_property_url",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "gsc_connections_site_id_sites_site_id_fk": {
          "name": "gsc_connections_site_id_sites_site_id_fk",
          "tableFrom": "gsc_connections",
          "tableTo": "sites",
          "columnsFrom": [
            "site_id"
          ],
          "columnsTo": [
            "site_id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.import_status": {
      "name": "import_status",
      "schema": "",
      "columns": {
        "import_id": {
          "name": "import_id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "site_id": {
          "name": "site_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "organization_id": {
          "name": "organization_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "platform": {
          "name": "platform",
          "type": "import_platform_enum",
          "typeSchema": "public",
          "primaryKey": false,
          "notNull": true
        },
        "imported_events": {
          "name": "imported_events",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "skipped_events": {
          "name": "skipped_events",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "invalid_events": {
          "name": "invalid_events",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "started_at": {
          "name": "started_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "completed_at": {
          "name": "completed_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "import_status_site_id_sites_site_id_fk": {
          "name": "import_status_site_id_sites_site_id_fk",
          "tableFrom": "import_status",
          "tableTo": "sites",
          "columnsFrom": [
            "site_id"
          ],
          "columnsTo": [
            "site_id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "import_status_organization_id_organization_id_fk": {
          "name": "import_status_organization_id_organization_id_fk",
          "tableFrom": "import_status",
          "tableTo": "organization",
          "columnsFrom": [
            "organization_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.invitation": {
      "name": "invitation",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "email": {
          "name": "email",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "inviterId": {
          "name": "inviterId",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "organizationId": {
          "name": "organizationId",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "role": {
          "name": "role",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "createdAt": {
          "name": "createdAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "expiresAt": {
          "name": "expiresAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "has_restricted_site_access": {
          "name": "has_restricted_site_access",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "site_ids": {
          "name": "site_ids",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false,
          "default": "'[]'::jsonb"
        },
        "teamId": {
          "name": "teamId",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "invitation_inviterId_user_id_fk": {
          "name": "invitation_inviterId_user_id_fk",
          "tableFrom": "invitation",
          "tableTo": "user",
          "columnsFrom": [
            "inviterId"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "invitation_organizationId_organization_id_fk": {
          "name": "invitation_organizationId_organization_id_fk",
          "tableFrom": "invitation",
          "tableTo": "organization",
          "columnsFrom": [
            "organizationId"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "invitation_teamId_team_id_fk": {
          "name": "invitation_teamId_team_id_fk",
          "tableFrom": "invitation",
          "tableTo": "team",
          "columnsFrom": [
            "teamId"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.member": {
      "name": "member",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "organizationId": {
          "name": "organizationId",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "userId": {
          "name": "userId",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "role": {
          "name": "role",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "createdAt": {
          "name": "createdAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "has_restricted_site_access": {
          "name": "has_restricted_site_access",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "member_organizationId_organization_id_fk": {
          "name": "member_organizationId_organization_id_fk",
          "tableFrom": "member",
          "tableTo": "organization",
          "columnsFrom": [
            "organizationId"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "member_userId_user_id_fk": {
          "name": "member_userId_user_id_fk",
          "tableFrom": "member",
          "tableTo": "user",
          "columnsFrom": [
            "userId"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.member_site_access": {
      "name": "member_site_access",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "member_id": {
          "name": "member_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "site_id": {
          "name": "site_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "created_by": {
          "name": "created_by",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "member_site_access_member_idx": {
          "name": "member_site_access_member_idx",
          "columns": [
            {
              "expression": "member_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "member_site_access_site_idx": {
          "name": "member_site_access_site_idx",
          "columns": [
            {
              "expression": "site_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "member_site_access_member_id_member_id_fk": {
          "name": "member_site_access_member_id_member_id_fk",
          "tableFrom": "member_site_access",
          "tableTo": "member",
          "columnsFrom": [
            "member_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "member_site_access_site_id_sites_site_id_fk": {
          "name": "member_site_access_site_id_sites_site_id_fk",
          "tableFrom": "member_site_access",
          "tableTo": "sites",
          "columnsFrom": [
            "site_id"
          ],
          "columnsTo": [
            "site_id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "member_site_access_created_by_user_id_fk": {
          "name": "member_site_access_created_by_user_id_fk",
          "tableFrom": "member_site_access",
          "tableTo": "user",
          "columnsFrom": [
            "created_by"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "member_site_access_unique": {
          "name": "member_site_access_unique",
          "nullsNotDistinct": false,
          "columns": [
            "member_id",
            "site_id"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.notification_channels": {
      "name": "notification_channels",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "organization_id": {
          "name": "organization_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "enabled": {
          "name": "enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "config": {
          "name": "config",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true
        },
        "monitor_ids": {
          "name": "monitor_ids",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "trigger_events": {
          "name": "trigger_events",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[\"down\",\"recovery\"]'::jsonb"
        },
        "cooldown_minutes": {
          "name": "cooldown_minutes",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 5
        },
        "last_notified_at": {
          "name": "last_notified_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "created_by": {
          "name": "created_by",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "notification_channels_organization_id_organization_id_fk": {
          "name": "notification_channels_organization_id_organization_id_fk",
          "tableFrom": "notification_channels",
          "tableTo": "organization",
          "columnsFrom": [
            "organization_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "notification_channels_created_by_user_id_fk": {
          "name": "notification_channels_created_by_user_id_fk",
          "tableFrom": "notification_channels",
          "tableTo": "user",
          "columnsFrom": [
            "created_by"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.oauthAccessToken": {
      "name": "oauthAccessToken",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "accessToken": {
          "name": "accessToken",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "refreshToken": {
          "name": "refreshToken",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "accessTokenExpiresAt": {
          "name": "accessTokenExpiresAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "refreshTokenExpiresAt": {
          "name": "refreshTokenExpiresAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "clientId": {
          "name": "clientId",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "userId": {
          "name": "userId",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "scopes": {
          "name": "scopes",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "createdAt": {
          "name": "createdAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "updatedAt": {
          "name": "updatedAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {},
      "foreignKeys": {
        "oauthAccessToken_clientId_oauthApplication_clientId_fk": {
          "name": "oauthAccessToken_clientId_oauthApplication_clientId_fk",
          "tableFrom": "oauthAccessToken",
          "tableTo": "oauthApplication",
          "columnsFrom": [
            "clientId"
          ],
          "columnsTo": [
            "clientId"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "oauthAccessToken_userId_user_id_fk": {
          "name": "oauthAccessToken_userId_user_id_fk",
          "tableFrom": "oauthAccessToken",
          "tableTo": "user",
          "columnsFrom": [
            "userId"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "oauthAccessToken_accessToken_unique": {
          "name": "oauthAccessToken_accessToken_unique",
          "nullsNotDistinct": false,
          "columns": [
            "accessToken"
          ]
        },
        "oauthAccessToken_refreshToken_unique": {
          "name": "oauthAccessToken_refreshToken_unique",
          "nullsNotDistinct": false,
          "columns": [
            "refreshToken"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.oauthApplication": {
      "name": "oauthApplication",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "icon": {
          "name": "icon",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "metadata": {
          "name": "metadata",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "clientId": {
          "name": "clientId",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "clientSecret": {
          "name": "clientSecret",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "redirectUrls": {
          "name": "redirectUrls",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "disabled": {
          "name": "disabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "userId": {
          "name": "userId",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "createdAt": {
          "name": "createdAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "updatedAt": {
          "name": "updatedAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {},
      "foreignKeys": {
        "oauthApplication_userId_user_id_fk": {
          "name": "oauthApplication_userId_user_id_fk",
          "tableFrom": "oauthApplication",
          "tableTo": "user",
          "columnsFrom": [
            "userId"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "oauthApplication_clientId_unique": {
          "name": "oauthApplication_clientId_unique",
          "nullsNotDistinct": false,
          "columns": [
            "clientId"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.oauthConsent": {
      "name": "oauthConsent",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "clientId": {
          "name": "clientId",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "userId": {
          "name": "userId",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "scopes": {
          "name": "scopes",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "consentGiven": {
          "name": "consentGiven",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true
        },
        "createdAt": {
          "name": "createdAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "updatedAt": {
          "name": "updatedAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {},
      "foreignKeys": {
        "oauthConsent_clientId_oauthApplication_clientId_fk": {
          "name": "oauthConsent_clientId_oauthApplication_clientId_fk",
          "tableFrom": "oauthConsent",
          "tableTo": "oauthApplication",
          "columnsFrom": [
            "clientId"
          ],
          "columnsTo": [
            "clientId"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "oauthConsent_userId_user_id_fk": {
          "name": "oauthConsent_userId_user_id_fk",
          "tableFrom": "oauthConsent",
          "tableTo": "user",
          "columnsFrom": [
            "userId"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.organization": {
      "name": "organization",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "slug": {
          "name": "slug",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "logo": {
          "name": "logo",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "createdAt": {
          "name": "createdAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "metadata": {
          "name": "metadata",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "stripeCustomerId": {
          "name": "stripeCustomerId",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "monthlyEventCount": {
          "name": "monthlyEventCount",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "overMonthlyLimit": {
          "name": "overMonthlyLimit",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "approachingLimitNotifiedPeriodStart": {
          "name": "approachingLimitNotifiedPeriodStart",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "planOverride": {
          "name": "planOverride",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "custom_plan": {
          "name": "custom_plan",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "organization_slug_unique": {
          "name": "organization_slug_unique",
          "nullsNotDistinct": false,
          "columns": [
            "slug"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.session": {
      "name": "session",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "expiresAt": {
          "name": "expiresAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "token": {
          "name": "token",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "createdAt": {
          "name": "createdAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "updatedAt": {
          "name": "updatedAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "ipAddress": {
          "name": "ipAddress",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "userAgent": {
          "name": "userAgent",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "userId": {
          "name": "userId",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "impersonatedBy": {
          "name": "impersonatedBy",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "activeOrganizationId": {
          "name": "activeOrganizationId",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "activeTeamId": {
          "name": "activeTeamId",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "session_userId_user_id_fk": {
          "name": "session_userId_user_id_fk",
          "tableFrom": "session",
          "tableTo": "user",
          "columnsFrom": [
            "userId"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "session_token_unique": {
          "name": "session_token_unique",
          "nullsNotDistinct": false,
          "columns": [
            "token"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.sites": {
      "name": "sites",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "site_id": {
          "name": "site_id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "type": {
          "name": "type",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "domain": {
          "name": "domain",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "created_by": {
          "name": "created_by",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "organization_id": {
          "name": "organization_id",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "public": {
          "name": "public",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "embed_enabled": {
          "name": "embed_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "saltUserIds": {
          "name": "saltUserIds",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "blockBots": {
          "name": "blockBots",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "excluded_ips": {
          "name": "excluded_ips",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false,
          "default": "'[]'::jsonb"
        },
        "excluded_countries": {
          "name": "excluded_countries",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false,
          "default": "'[]'::jsonb"
        },
        "excluded_paths": {
          "name": "excluded_paths",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false,
          "default": "'[]'::jsonb"
        },
        "excluded_hostnames": {
          "name": "excluded_hostnames",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false,
          "default": "'[]'::jsonb"
        },
        "excluded_user_agents": {
          "name": "excluded_user_agents",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false,
          "default": "'[]'::jsonb"
        },
        "sessionReplay": {
          "name": "sessionReplay",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "webVitals": {
          "name": "webVitals",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "trackErrors": {
          "name": "trackErrors",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "trackOutbound": {
          "name": "trackOutbound",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "trackUrlParams": {
          "name": "trackUrlParams",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "trackInitialPageView": {
          "name": "trackInitialPageView",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "trackSpaNavigation": {
          "name": "trackSpaNavigation",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "trackIp": {
          "name": "trackIp",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "trackButtonClicks": {
          "name": "trackButtonClicks",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "trackCopy": {
          "name": "trackCopy",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "trackFormInteractions": {
          "name": "trackFormInteractions",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "api_key": {
          "name": "api_key",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "private_link_key": {
          "name": "private_link_key",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "tags": {
          "name": "tags",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false,
          "default": "'[]'::jsonb"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "sites_created_by_user_id_fk": {
          "name": "sites_created_by_user_id_fk",
          "tableFrom": "sites",
          "tableTo": "user",
          "columnsFrom": [
            "created_by"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "sites_organization_id_organization_id_fk": {
          "name": "sites_organization_id_organization_id_fk",
          "tableFrom": "sites",
          "tableTo": "organization",
          "columnsFrom": [
            "organization_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {
        "sites_type_check": {
          "name": "sites_type_check",
          "value": "\"sites\".\"type\" IS NULL OR \"sites\".\"type\" IN ('web', 'mobile')"
        }
      },
      "isRLSEnabled": false
    },
    "public.team": {
      "name": "team",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "organizationId": {
          "name": "organizationId",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "createdAt": {
          "name": "createdAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "updatedAt": {
          "name": "updatedAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "team_organizationId_organization_id_fk": {
          "name": "team_organizationId_organization_id_fk",
          "tableFrom": "team",
          "tableTo": "organization",
          "columnsFrom": [
            "organizationId"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.teamMember": {
      "name": "teamMember",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "teamId": {
          "name": "teamId",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "userId": {
          "name": "userId",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "createdAt": {
          "name": "createdAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "teamMember_teamId_team_id_fk": {
          "name": "teamMember_teamId_team_id_fk",
          "tableFrom": "teamMember",
          "tableTo": "team",
          "columnsFrom": [
            "teamId"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "teamMember_userId_user_id_fk": {
          "name": "teamMember_userId_user_id_fk",
          "tableFrom": "teamMember",
          "tableTo": "user",
          "columnsFrom": [
            "userId"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.team_site_access": {
      "name": "team_site_access",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "team_id": {
          "name": "team_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "site_id": {
          "name": "site_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "team_site_access_team_idx": {
          "name": "team_site_access_team_idx",
          "columns": [
            {
              "expression": "team_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "team_site_access_site_idx": {
          "name": "team_site_access_site_idx",
          "columns": [
            {
              "expression": "site_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "team_site_access_team_id_team_id_fk": {
          "name": "team_site_access_team_id_team_id_fk",
          "tableFrom": "team_site_access",
          "tableTo": "team",
          "columnsFrom": [
            "team_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "team_site_access_site_id_sites_site_id_fk": {
          "name": "team_site_access_site_id_sites_site_id_fk",
          "tableFrom": "team_site_access",
          "tableTo": "sites",
          "columnsFrom": [
            "site_id"
          ],
          "columnsTo": [
            "site_id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "team_site_access_unique": {
          "name": "team_site_access_unique",
          "nullsNotDistinct": false,
          "columns": [
            "team_id",
            "site_id"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.telemetry": {
      "name": "telemetry",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "instance_id": {
          "name": "instance_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "timestamp": {
          "name": "timestamp",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "version": {
          "name": "version",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "table_counts": {
          "name": "table_counts",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true
        },
        "clickhouse_size_gb": {
          "name": "clickhouse_size_gb",
          "type": "real",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.uptime_alert_history": {
      "name": "uptime_alert_history",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "alert_id": {
          "name": "alert_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "monitor_id": {
          "name": "monitor_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "triggered_at": {
          "name": "triggered_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "resolved_at": {
          "name": "resolved_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "alert_data": {
          "name": "alert_data",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "uptime_alert_history_alert_id_uptime_alerts_id_fk": {
          "name": "uptime_alert_history_alert_id_uptime_alerts_id_fk",
          "tableFrom": "uptime_alert_history",
          "tableTo": "uptime_alerts",
          "columnsFrom": [
            "alert_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "uptime_alert_history_monitor_id_uptime_monitors_id_fk": {
          "name": "uptime_alert_history_monitor_id_uptime_monitors_id_fk",
          "tableFrom": "uptime_alert_history",
          "tableTo": "uptime_monitors",
          "columnsFrom": [
            "monitor_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.uptime_alerts": {
      "name": "uptime_alerts",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "monitor_id": {
          "name": "monitor_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "alert_type": {
          "name": "alert_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "alert_config": {
          "name": "alert_config",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true
        },
        "conditions": {
          "name": "conditions",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true
        },
        "enabled": {
          "name": "enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "uptime_alerts_monitor_id_uptime_monitors_id_fk": {
          "name": "uptime_alerts_monitor_id_uptime_monitors_id_fk",
          "tableFrom": "uptime_alerts",
          "tableTo": "uptime_monitors",
          "columnsFrom": [
            "monitor_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.uptime_incidents": {
      "name": "uptime_incidents",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "organization_id": {
          "name": "organization_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "monitor_id": {
          "name": "monitor_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "region": {
          "name": "region",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "start_time": {
          "name": "start_time",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "end_time": {
          "name": "end_time",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'active'"
        },
        "acknowledged_by": {
          "name": "acknowledged_by",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "acknowledged_at": {
          "name": "acknowledged_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "resolved_by": {
          "name": "resolved_by",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "resolved_at": {
          "name": "resolved_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "last_error": {
          "name": "last_error",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "last_error_type": {
          "name": "last_error_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "failure_count": {
          "name": "failure_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 1
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "uptime_incidents_organization_id_organization_id_fk": {
          "name": "uptime_incidents_organization_id_organization_id_fk",
          "tableFrom": "uptime_incidents",
          "tableTo": "organization",
          "columnsFrom": [
            "organization_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "uptime_incidents_monitor_id_uptime_monitors_id_fk": {
          "name": "uptime_incidents_monitor_id_uptime_monitors_id_fk",
          "tableFrom": "uptime_incidents",
          "tableTo": "uptime_monitors",
          "columnsFrom": [
            "monitor_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "uptime_incidents_acknowledged_by_user_id_fk": {
          "name": "uptime_incidents_acknowledged_by_user_id_fk",
          "tableFrom": "uptime_incidents",
          "tableTo": "user",
          "columnsFrom": [
            "acknowledged_by"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        },
        "uptime_incidents_resolved_by_user_id_fk": {
          "name": "uptime_incidents_resolved_by_user_id_fk",
          "tableFrom": "uptime_incidents",
          "tableTo": "user",
          "columnsFrom": [
            "resolved_by"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.uptime_monitor_status": {
      "name": "uptime_monitor_status",
      "schema": "",
      "columns": {
        "monitor_id": {
          "name": "monitor_id",
          "type": "integer",
          "primaryKey": true,
          "notNull": true
        },
        "last_checked_at": {
          "name": "last_checked_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "next_check_at": {
          "name": "next_check_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "current_status": {
          "name": "current_status",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'unknown'"
        },
        "consecutive_failures": {
          "name": "consecutive_failures",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "consecutive_successes": {
          "name": "consecutive_successes",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "uptime_percentage_24h": {
          "name": "uptime_percentage_24h",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "uptime_percentage_7d": {
          "name": "uptime_percentage_7d",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "uptime_percentage_30d": {
          "name": "uptime_percentage_30d",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "average_response_time_24h": {
          "name": "average_response_time_24h",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        }
      },
      "indexes": {
        "uptime_monitor_status_updated_at_idx": {
          "name": "uptime_monitor_status_updated_at_idx",
          "columns": [
            {
              "expression": "updated_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "uptime_monitor_status_monitor_id_uptime_monitors_id_fk": {
          "name": "uptime_monitor_status_monitor_id_uptime_monitors_id_fk",
          "tableFrom": "uptime_monitor_status",
          "tableTo": "uptime_monitors",
          "columnsFrom": [
            "monitor_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {
        "uptime_monitor_status_current_status_check": {
          "name": "uptime_monitor_status_current_status_check",
          "value": "current_status IN ('up', 'down', 'unknown')"
        },
        "uptime_monitor_status_uptime_24h_check": {
          "name": "uptime_monitor_status_uptime_24h_check",
          "value": "uptime_percentage_24h >= 0 AND uptime_percentage_24h <= 100"
        },
        "uptime_monitor_status_uptime_7d_check": {
          "name": "uptime_monitor_status_uptime_7d_check",
          "value": "uptime_percentage_7d >= 0 AND uptime_percentage_7d <= 100"
        },
        "uptime_monitor_status_uptime_30d_check": {
          "name": "uptime_monitor_status_uptime_30d_check",
          "value": "uptime_percentage_30d >= 0 AND uptime_percentage_30d <= 100"
        }
      },
      "isRLSEnabled": false
    },
    "public.uptime_monitors": {
      "name": "uptime_monitors",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "organization_id": {
          "name": "organization_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "monitor_type": {
          "name": "monitor_type",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "interval_seconds": {
          "name": "interval_seconds",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "enabled": {
          "name": "enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "http_config": {
          "name": "http_config",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "tcp_config": {
          "name": "tcp_config",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false
        },
        "validation_rules": {
          "name": "validation_rules",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true,
          "default": "'[]'::jsonb"
        },
        "monitoring_type": {
          "name": "monitoring_type",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "default": "'local'"
        },
        "selected_regions": {
          "name": "selected_regions",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false,
          "default": "'[\"local\"]'::jsonb"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "default": "now()"
        },
        "created_by": {
          "name": "created_by",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {
        "uptime_monitors_organization_id_organization_id_fk": {
          "name": "uptime_monitors_organization_id_organization_id_fk",
          "tableFrom": "uptime_monitors",
          "tableTo": "organization",
          "columnsFrom": [
            "organization_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "uptime_monitors_created_by_user_id_fk": {
          "name": "uptime_monitors_created_by_user_id_fk",
          "tableFrom": "uptime_monitors",
          "tableTo": "user",
          "columnsFrom": [
            "created_by"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "set null",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.user": {
      "name": "user",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "username": {
          "name": "username",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "email": {
          "name": "email",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "emailVerified": {
          "name": "emailVerified",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true
        },
        "image": {
          "name": "image",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "createdAt": {
          "name": "createdAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "updatedAt": {
          "name": "updatedAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "role": {
          "name": "role",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "default": "'user'"
        },
        "displayUsername": {
          "name": "displayUsername",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "banned": {
          "name": "banned",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false
        },
        "banReason": {
          "name": "banReason",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "banExpires": {
          "name": "banExpires",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "stripeCustomerId": {
          "name": "stripeCustomerId",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "overMonthlyLimit": {
          "name": "overMonthlyLimit",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": false
        },
        "monthlyEventCount": {
          "name": "monthlyEventCount",
          "type": "integer",
          "primaryKey": false,
          "notNull": false,
          "default": 0
        },
        "sendAutoEmailReports": {
          "name": "sendAutoEmailReports",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "default": true
        },
        "scheduled_tip_email_ids": {
          "name": "scheduled_tip_email_ids",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false,
          "default": "'[]'::jsonb"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "user_username_unique": {
          "name": "user_username_unique",
          "nullsNotDistinct": false,
          "columns": [
            "username"
          ]
        },
        "user_email_unique": {
          "name": "user_email_unique",
          "nullsNotDistinct": false,
          "columns": [
            "email"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.user_aliases": {
      "name": "user_aliases",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "serial",
          "primaryKey": true,
          "notNull": true
        },
        "site_id": {
          "name": "site_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "anonymous_id": {
          "name": "anonymous_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "user_aliases_user_idx": {
          "name": "user_aliases_user_idx",
          "columns": [
            {
              "expression": "site_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "user_aliases_anon_idx": {
          "name": "user_aliases_anon_idx",
          "columns": [
            {
              "expression": "site_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "anonymous_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "user_aliases_site_id_sites_site_id_fk": {
          "name": "user_aliases_site_id_sites_site_id_fk",
          "tableFrom": "user_aliases",
          "tableTo": "sites",
          "columnsFrom": [
            "site_id"
          ],
          "columnsTo": [
            "site_id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {
        "user_aliases_site_anon_unique": {
          "name": "user_aliases_site_anon_unique",
          "nullsNotDistinct": false,
          "columns": [
            "site_id",
            "anonymous_id"
          ]
        }
      },
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.user_profiles": {
      "name": "user_profiles",
      "schema": "",
      "columns": {
        "site_id": {
          "name": "site_id",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        },
        "user_id": {
          "name": "user_id",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "traits": {
          "name": "traits",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": false,
          "default": "'{}'::jsonb"
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "user_profiles_site_idx": {
          "name": "user_profiles_site_idx",
          "columns": [
            {
              "expression": "site_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "user_profiles_site_id_sites_site_id_fk": {
          "name": "user_profiles_site_id_sites_site_id_fk",
          "tableFrom": "user_profiles",
          "tableTo": "sites",
          "columnsFrom": [
            "site_id"
          ],
          "columnsTo": [
            "site_id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {
        "user_profiles_site_id_user_id_pk": {
          "name": "user_profiles_site_id_user_id_pk",
          "columns": [
            "site_id",
            "user_id"
          ]
        }
      },
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.verification": {
      "name": "verification",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "text",
          "primaryKey": true,
          "notNull": true
        },
        "identifier": {
          "name": "identifier",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "value": {
          "name": "value",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "expiresAt": {
          "name": "expiresAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true
        },
        "createdAt": {
          "name": "createdAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        },
        "updatedAt": {
          "name": "updatedAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    }
  },
  "enums": {
    "public.import_platform_enum": {
      "name": "import_platform_enum",
      "schema": "public",
      "values": [
        "umami",
        "simple_analytics",
        "plausible"
      ]
    }
  },
  "schemas": {},
  "sequences": {},
  "roles": {},
  "policies": {},
  "views": {},
  "_meta": {
    "columns": {},
    "schemas": {},
    "tables": {}
  }
}