{
  "id": "88b17896-d430-4ffe-a00c-58dff181bc31",
  "prevId": "8b6be6d6-3eb4-4266-b5d9-8d67ba7f42c9",
  "version": "7",
  "dialect": "postgresql",
  "tables": {
    "public.rules": {
      "name": "rules",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "name": {
          "name": "name",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": true
        },
        "type": {
          "name": "type",
          "type": "varchar(50)",
          "primaryKey": false,
          "notNull": true
        },
        "params": {
          "name": "params",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true
        },
        "server_user_id": {
          "name": "server_user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "is_active": {
          "name": "is_active",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "rules_active_idx": {
          "name": "rules_active_idx",
          "columns": [
            {
              "expression": "is_active",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "rules_server_user_id_idx": {
          "name": "rules_server_user_id_idx",
          "columns": [
            {
              "expression": "server_user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "rules_server_user_id_server_users_id_fk": {
          "name": "rules_server_user_id_server_users_id_fk",
          "tableFrom": "rules",
          "tableTo": "server_users",
          "columnsFrom": [
            "server_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.server_users": {
      "name": "server_users",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "user_id": {
          "name": "user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "server_id": {
          "name": "server_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "external_id": {
          "name": "external_id",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": true
        },
        "username": {
          "name": "username",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": true
        },
        "email": {
          "name": "email",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "thumb_url": {
          "name": "thumb_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "is_server_admin": {
          "name": "is_server_admin",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "trust_score": {
          "name": "trust_score",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 100
        },
        "session_count": {
          "name": "session_count",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "server_users_user_server_unique": {
          "name": "server_users_user_server_unique",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "server_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "server_users_server_external_unique": {
          "name": "server_users_server_external_unique",
          "columns": [
            {
              "expression": "server_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "external_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "server_users_user_idx": {
          "name": "server_users_user_idx",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "server_users_server_idx": {
          "name": "server_users_server_idx",
          "columns": [
            {
              "expression": "server_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "server_users_username_idx": {
          "name": "server_users_username_idx",
          "columns": [
            {
              "expression": "username",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "server_users_user_id_users_id_fk": {
          "name": "server_users_user_id_users_id_fk",
          "tableFrom": "server_users",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "server_users_server_id_servers_id_fk": {
          "name": "server_users_server_id_servers_id_fk",
          "tableFrom": "server_users",
          "tableTo": "servers",
          "columnsFrom": [
            "server_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.servers": {
      "name": "servers",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "name": {
          "name": "name",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": true
        },
        "type": {
          "name": "type",
          "type": "varchar(20)",
          "primaryKey": false,
          "notNull": true
        },
        "url": {
          "name": "url",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "token": {
          "name": "token",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.sessions": {
      "name": "sessions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "server_id": {
          "name": "server_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "server_user_id": {
          "name": "server_user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "session_key": {
          "name": "session_key",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": true
        },
        "state": {
          "name": "state",
          "type": "varchar(20)",
          "primaryKey": false,
          "notNull": true
        },
        "media_type": {
          "name": "media_type",
          "type": "varchar(20)",
          "primaryKey": false,
          "notNull": true
        },
        "media_title": {
          "name": "media_title",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "grandparent_title": {
          "name": "grandparent_title",
          "type": "varchar(500)",
          "primaryKey": false,
          "notNull": false
        },
        "season_number": {
          "name": "season_number",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "episode_number": {
          "name": "episode_number",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "year": {
          "name": "year",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "thumb_path": {
          "name": "thumb_path",
          "type": "varchar(500)",
          "primaryKey": false,
          "notNull": false
        },
        "rating_key": {
          "name": "rating_key",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "external_session_id": {
          "name": "external_session_id",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "started_at": {
          "name": "started_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "stopped_at": {
          "name": "stopped_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "duration_ms": {
          "name": "duration_ms",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "total_duration_ms": {
          "name": "total_duration_ms",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "progress_ms": {
          "name": "progress_ms",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        },
        "last_paused_at": {
          "name": "last_paused_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        },
        "paused_duration_ms": {
          "name": "paused_duration_ms",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "reference_id": {
          "name": "reference_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": false
        },
        "watched": {
          "name": "watched",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "ip_address": {
          "name": "ip_address",
          "type": "varchar(45)",
          "primaryKey": false,
          "notNull": true
        },
        "geo_city": {
          "name": "geo_city",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "geo_region": {
          "name": "geo_region",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "geo_country": {
          "name": "geo_country",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false
        },
        "geo_lat": {
          "name": "geo_lat",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "geo_lon": {
          "name": "geo_lon",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "player_name": {
          "name": "player_name",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "device_id": {
          "name": "device_id",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "product": {
          "name": "product",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "device": {
          "name": "device",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "platform": {
          "name": "platform",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false
        },
        "quality": {
          "name": "quality",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false
        },
        "is_transcode": {
          "name": "is_transcode",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "bitrate": {
          "name": "bitrate",
          "type": "integer",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "sessions_server_user_time_idx": {
          "name": "sessions_server_user_time_idx",
          "columns": [
            {
              "expression": "server_user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "started_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "sessions_server_time_idx": {
          "name": "sessions_server_time_idx",
          "columns": [
            {
              "expression": "server_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "started_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "sessions_state_idx": {
          "name": "sessions_state_idx",
          "columns": [
            {
              "expression": "state",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "sessions_external_session_idx": {
          "name": "sessions_external_session_idx",
          "columns": [
            {
              "expression": "server_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "external_session_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "sessions_device_idx": {
          "name": "sessions_device_idx",
          "columns": [
            {
              "expression": "server_user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "device_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "sessions_reference_idx": {
          "name": "sessions_reference_idx",
          "columns": [
            {
              "expression": "reference_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "sessions_server_user_rating_idx": {
          "name": "sessions_server_user_rating_idx",
          "columns": [
            {
              "expression": "server_user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "rating_key",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "sessions_geo_idx": {
          "name": "sessions_geo_idx",
          "columns": [
            {
              "expression": "geo_lat",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "geo_lon",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "sessions_geo_time_idx": {
          "name": "sessions_geo_time_idx",
          "columns": [
            {
              "expression": "started_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "geo_lat",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "geo_lon",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "sessions_media_type_idx": {
          "name": "sessions_media_type_idx",
          "columns": [
            {
              "expression": "media_type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "sessions_transcode_idx": {
          "name": "sessions_transcode_idx",
          "columns": [
            {
              "expression": "is_transcode",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "sessions_platform_idx": {
          "name": "sessions_platform_idx",
          "columns": [
            {
              "expression": "platform",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "sessions_top_movies_idx": {
          "name": "sessions_top_movies_idx",
          "columns": [
            {
              "expression": "media_type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "media_title",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "year",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "sessions_top_shows_idx": {
          "name": "sessions_top_shows_idx",
          "columns": [
            {
              "expression": "media_type",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            },
            {
              "expression": "grandparent_title",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "sessions_server_id_servers_id_fk": {
          "name": "sessions_server_id_servers_id_fk",
          "tableFrom": "sessions",
          "tableTo": "servers",
          "columnsFrom": [
            "server_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "sessions_server_user_id_server_users_id_fk": {
          "name": "sessions_server_user_id_server_users_id_fk",
          "tableFrom": "sessions",
          "tableTo": "server_users",
          "columnsFrom": [
            "server_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.settings": {
      "name": "settings",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "integer",
          "primaryKey": true,
          "notNull": true,
          "default": 1
        },
        "allow_guest_access": {
          "name": "allow_guest_access",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "discord_webhook_url": {
          "name": "discord_webhook_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "custom_webhook_url": {
          "name": "custom_webhook_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "notify_on_violation": {
          "name": "notify_on_violation",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "notify_on_session_start": {
          "name": "notify_on_session_start",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "notify_on_session_stop": {
          "name": "notify_on_session_stop",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": false
        },
        "notify_on_server_down": {
          "name": "notify_on_server_down",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "poller_enabled": {
          "name": "poller_enabled",
          "type": "boolean",
          "primaryKey": false,
          "notNull": true,
          "default": true
        },
        "poller_interval_ms": {
          "name": "poller_interval_ms",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 15000
        },
        "tautulli_url": {
          "name": "tautulli_url",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "tautulli_api_key": {
          "name": "tautulli_api_key",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.users": {
      "name": "users",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "username": {
          "name": "username",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "thumbnail": {
          "name": "thumbnail",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "email": {
          "name": "email",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "password_hash": {
          "name": "password_hash",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "plex_account_id": {
          "name": "plex_account_id",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false
        },
        "role": {
          "name": "role",
          "type": "varchar(20)",
          "primaryKey": false,
          "notNull": true,
          "default": "'member'"
        },
        "aggregate_trust_score": {
          "name": "aggregate_trust_score",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 100
        },
        "total_violations": {
          "name": "total_violations",
          "type": "integer",
          "primaryKey": false,
          "notNull": true,
          "default": 0
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "users_username_idx": {
          "name": "users_username_idx",
          "columns": [
            {
              "expression": "username",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "users_email_unique": {
          "name": "users_email_unique",
          "columns": [
            {
              "expression": "email",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "users_plex_account_id_idx": {
          "name": "users_plex_account_id_idx",
          "columns": [
            {
              "expression": "plex_account_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "users_role_idx": {
          "name": "users_role_idx",
          "columns": [
            {
              "expression": "role",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.violations": {
      "name": "violations",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "rule_id": {
          "name": "rule_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "server_user_id": {
          "name": "server_user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "session_id": {
          "name": "session_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "severity": {
          "name": "severity",
          "type": "varchar(20)",
          "primaryKey": false,
          "notNull": true
        },
        "data": {
          "name": "data",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "acknowledged_at": {
          "name": "acknowledged_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": false
        }
      },
      "indexes": {
        "violations_server_user_id_idx": {
          "name": "violations_server_user_id_idx",
          "columns": [
            {
              "expression": "server_user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "violations_rule_id_idx": {
          "name": "violations_rule_id_idx",
          "columns": [
            {
              "expression": "rule_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "violations_created_at_idx": {
          "name": "violations_created_at_idx",
          "columns": [
            {
              "expression": "created_at",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "violations_rule_id_rules_id_fk": {
          "name": "violations_rule_id_rules_id_fk",
          "tableFrom": "violations",
          "tableTo": "rules",
          "columnsFrom": [
            "rule_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "violations_server_user_id_server_users_id_fk": {
          "name": "violations_server_user_id_server_users_id_fk",
          "tableFrom": "violations",
          "tableTo": "server_users",
          "columnsFrom": [
            "server_user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        },
        "violations_session_id_sessions_id_fk": {
          "name": "violations_session_id_sessions_id_fk",
          "tableFrom": "violations",
          "tableTo": "sessions",
          "columnsFrom": [
            "session_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "cascade",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    }
  },
  "enums": {},
  "schemas": {},
  "sequences": {},
  "roles": {},
  "policies": {},
  "views": {},
  "_meta": {
    "columns": {},
    "schemas": {},
    "tables": {}
  }
}