{
  "id": "da5776ab-55b4-4aa6-85da-61db5fc31546",
  "prevId": "16700e2c-ff8f-4864-a71a-6f4b98a1313a",
  "version": "7",
  "dialect": "postgresql",
  "tables": {
    "public.app_events": {
      "name": "app_events",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "name": {
          "name": "name",
          "type": "varchar(120)",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.diagnoses": {
      "name": "diagnoses",
      "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
        },
        "predicted_disease_slug": {
          "name": "predicted_disease_slug",
          "type": "varchar(80)",
          "primaryKey": false,
          "notNull": false
        },
        "confidence": {
          "name": "confidence",
          "type": "real",
          "primaryKey": false,
          "notNull": false
        },
        "status": {
          "name": "status",
          "type": "varchar(40)",
          "primaryKey": false,
          "notNull": true
        },
        "failure_reason": {
          "name": "failure_reason",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "image_url": {
          "name": "image_url",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "uploader_public_id": {
          "name": "uploader_public_id",
          "type": "varchar(160)",
          "primaryKey": false,
          "notNull": true
        },
        "image_file_name": {
          "name": "image_file_name",
          "type": "varchar(240)",
          "primaryKey": false,
          "notNull": true
        },
        "image_mime_type": {
          "name": "image_mime_type",
          "type": "varchar(120)",
          "primaryKey": false,
          "notNull": true
        },
        "image_size_bytes": {
          "name": "image_size_bytes",
          "type": "integer",
          "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": {
        "diagnoses_user_id_idx": {
          "name": "diagnoses_user_id_idx",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "diagnoses_status_idx": {
          "name": "diagnoses_status_idx",
          "columns": [
            {
              "expression": "status",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "diagnoses_user_id_users_id_fk": {
          "name": "diagnoses_user_id_users_id_fk",
          "tableFrom": "diagnoses",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "diagnoses_predicted_disease_slug_disease_catalog_slug_fk": {
          "name": "diagnoses_predicted_disease_slug_disease_catalog_slug_fk",
          "tableFrom": "diagnoses",
          "tableTo": "disease_catalog",
          "columnsFrom": [
            "predicted_disease_slug"
          ],
          "columnsTo": [
            "slug"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.diagnosis_predictions": {
      "name": "diagnosis_predictions",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "diagnosis_id": {
          "name": "diagnosis_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "disease_slug": {
          "name": "disease_slug",
          "type": "varchar(80)",
          "primaryKey": false,
          "notNull": false
        },
        "model_label": {
          "name": "model_label",
          "type": "varchar(120)",
          "primaryKey": false,
          "notNull": true
        },
        "confidence": {
          "name": "confidence",
          "type": "real",
          "primaryKey": false,
          "notNull": true
        },
        "rank": {
          "name": "rank",
          "type": "integer",
          "primaryKey": false,
          "notNull": true
        }
      },
      "indexes": {
        "diagnosis_predictions_diagnosis_id_idx": {
          "name": "diagnosis_predictions_diagnosis_id_idx",
          "columns": [
            {
              "expression": "diagnosis_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "diagnosis_predictions_diagnosis_id_diagnoses_id_fk": {
          "name": "diagnosis_predictions_diagnosis_id_diagnoses_id_fk",
          "tableFrom": "diagnosis_predictions",
          "tableTo": "diagnoses",
          "columnsFrom": [
            "diagnosis_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "diagnosis_predictions_disease_slug_disease_catalog_slug_fk": {
          "name": "diagnosis_predictions_disease_slug_disease_catalog_slug_fk",
          "tableFrom": "diagnosis_predictions",
          "tableTo": "disease_catalog",
          "columnsFrom": [
            "disease_slug"
          ],
          "columnsTo": [
            "slug"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.disease_catalog": {
      "name": "disease_catalog",
      "schema": "",
      "columns": {
        "slug": {
          "name": "slug",
          "type": "varchar(80)",
          "primaryKey": true,
          "notNull": true
        },
        "label": {
          "name": "label",
          "type": "varchar(80)",
          "primaryKey": false,
          "notNull": true
        },
        "common_name": {
          "name": "common_name",
          "type": "varchar(120)",
          "primaryKey": false,
          "notNull": true
        },
        "summary": {
          "name": "summary",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "symptoms": {
          "name": "symptoms",
          "type": "text[]",
          "primaryKey": false,
          "notNull": true
        },
        "recommendations": {
          "name": "recommendations",
          "type": "text[]",
          "primaryKey": false,
          "notNull": true
        },
        "risk_level": {
          "name": "risk_level",
          "type": "varchar(20)",
          "primaryKey": false,
          "notNull": true
        },
        "accent_color": {
          "name": "accent_color",
          "type": "varchar(40)",
          "primaryKey": false,
          "notNull": true
        },
        "display_order": {
          "name": "display_order",
          "type": "integer",
          "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.expert_reviews": {
      "name": "expert_reviews",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "diagnosis_id": {
          "name": "diagnosis_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "expert_id": {
          "name": "expert_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "verdict": {
          "name": "verdict",
          "type": "varchar(20)",
          "primaryKey": false,
          "notNull": true
        },
        "corrected_disease_slug": {
          "name": "corrected_disease_slug",
          "type": "varchar(80)",
          "primaryKey": false,
          "notNull": false
        },
        "notes": {
          "name": "notes",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "expert_reviews_diagnosis_id_idx": {
          "name": "expert_reviews_diagnosis_id_idx",
          "columns": [
            {
              "expression": "diagnosis_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "expert_reviews_expert_id_idx": {
          "name": "expert_reviews_expert_id_idx",
          "columns": [
            {
              "expression": "expert_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "expert_reviews_diagnosis_id_diagnoses_id_fk": {
          "name": "expert_reviews_diagnosis_id_diagnoses_id_fk",
          "tableFrom": "expert_reviews",
          "tableTo": "diagnoses",
          "columnsFrom": [
            "diagnosis_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "expert_reviews_expert_id_users_id_fk": {
          "name": "expert_reviews_expert_id_users_id_fk",
          "tableFrom": "expert_reviews",
          "tableTo": "users",
          "columnsFrom": [
            "expert_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        },
        "expert_reviews_corrected_disease_slug_disease_catalog_slug_fk": {
          "name": "expert_reviews_corrected_disease_slug_disease_catalog_slug_fk",
          "tableFrom": "expert_reviews",
          "tableTo": "disease_catalog",
          "columnsFrom": [
            "corrected_disease_slug"
          ],
          "columnsTo": [
            "slug"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.image_classifications": {
      "name": "image_classifications",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "predicted_disease_slug": {
          "name": "predicted_disease_slug",
          "type": "varchar(80)",
          "primaryKey": false,
          "notNull": true
        },
        "confidence": {
          "name": "confidence",
          "type": "real",
          "primaryKey": false,
          "notNull": true
        },
        "probabilities": {
          "name": "probabilities",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true
        },
        "image_url": {
          "name": "image_url",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "original_file_name": {
          "name": "original_file_name",
          "type": "varchar(240)",
          "primaryKey": false,
          "notNull": true
        },
        "uploader_public_id": {
          "name": "uploader_public_id",
          "type": "varchar(160)",
          "primaryKey": false,
          "notNull": true
        },
        "uploader_payload": {
          "name": "uploader_payload",
          "type": "jsonb",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "image_classifications_predicted_disease_slug_disease_catalog_slug_fk": {
          "name": "image_classifications_predicted_disease_slug_disease_catalog_slug_fk",
          "tableFrom": "image_classifications",
          "tableTo": "disease_catalog",
          "columnsFrom": [
            "predicted_disease_slug"
          ],
          "columnsTo": [
            "slug"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    },
    "public.manual_classifications": {
      "name": "manual_classifications",
      "schema": "",
      "columns": {
        "id": {
          "name": "id",
          "type": "uuid",
          "primaryKey": true,
          "notNull": true,
          "default": "gen_random_uuid()"
        },
        "disease_slug": {
          "name": "disease_slug",
          "type": "varchar(80)",
          "primaryKey": false,
          "notNull": true
        },
        "observation": {
          "name": "observation",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "location": {
          "name": "location",
          "type": "varchar(160)",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {},
      "foreignKeys": {
        "manual_classifications_disease_slug_disease_catalog_slug_fk": {
          "name": "manual_classifications_disease_slug_disease_catalog_slug_fk",
          "tableFrom": "manual_classifications",
          "tableTo": "disease_catalog",
          "columnsFrom": [
            "disease_slug"
          ],
          "columnsTo": [
            "slug"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "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()"
        },
        "user_id": {
          "name": "user_id",
          "type": "uuid",
          "primaryKey": false,
          "notNull": true
        },
        "token_hash": {
          "name": "token_hash",
          "type": "text",
          "primaryKey": false,
          "notNull": true
        },
        "expires_at": {
          "name": "expires_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "sessions_token_hash_idx": {
          "name": "sessions_token_hash_idx",
          "columns": [
            {
              "expression": "token_hash",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "sessions_user_id_idx": {
          "name": "sessions_user_id_idx",
          "columns": [
            {
              "expression": "user_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": false,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {
        "sessions_user_id_users_id_fk": {
          "name": "sessions_user_id_users_id_fk",
          "tableFrom": "sessions",
          "tableTo": "users",
          "columnsFrom": [
            "user_id"
          ],
          "columnsTo": [
            "id"
          ],
          "onDelete": "no action",
          "onUpdate": "no action"
        }
      },
      "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()"
        },
        "email": {
          "name": "email",
          "type": "varchar(240)",
          "primaryKey": false,
          "notNull": true
        },
        "name": {
          "name": "name",
          "type": "varchar(160)",
          "primaryKey": false,
          "notNull": true
        },
        "password_hash": {
          "name": "password_hash",
          "type": "text",
          "primaryKey": false,
          "notNull": false
        },
        "role": {
          "name": "role",
          "type": "varchar(20)",
          "primaryKey": false,
          "notNull": true,
          "default": "'user'"
        },
        "google_id": {
          "name": "google_id",
          "type": "varchar(240)",
          "primaryKey": false,
          "notNull": false
        },
        "created_at": {
          "name": "created_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        },
        "updated_at": {
          "name": "updated_at",
          "type": "timestamp with time zone",
          "primaryKey": false,
          "notNull": true,
          "default": "now()"
        }
      },
      "indexes": {
        "users_email_idx": {
          "name": "users_email_idx",
          "columns": [
            {
              "expression": "email",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        },
        "users_google_id_idx": {
          "name": "users_google_id_idx",
          "columns": [
            {
              "expression": "google_id",
              "isExpression": false,
              "asc": true,
              "nulls": "last"
            }
          ],
          "isUnique": true,
          "concurrently": false,
          "method": "btree",
          "with": {}
        }
      },
      "foreignKeys": {},
      "compositePrimaryKeys": {},
      "uniqueConstraints": {},
      "policies": {},
      "checkConstraints": {},
      "isRLSEnabled": false
    }
  },
  "enums": {},
  "schemas": {},
  "sequences": {},
  "roles": {},
  "policies": {},
  "views": {},
  "_meta": {
    "columns": {},
    "schemas": {},
    "tables": {}
  }
}