1936 lines
46 KiB
JSON
1936 lines
46 KiB
JSON
{
|
|
"tables": {
|
|
"account_tokens": {
|
|
"columns": {
|
|
"id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": true
|
|
},
|
|
"account_id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"name": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"token": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"source": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": "'manual'",
|
|
"primaryKey": false
|
|
},
|
|
"enabled": {
|
|
"logicalType": "boolean",
|
|
"notNull": false,
|
|
"defaultValue": "true",
|
|
"primaryKey": false
|
|
},
|
|
"is_default": {
|
|
"logicalType": "boolean",
|
|
"notNull": false,
|
|
"defaultValue": "false",
|
|
"primaryKey": false
|
|
},
|
|
"created_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": "datetime('now')",
|
|
"primaryKey": false
|
|
},
|
|
"updated_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": "datetime('now')",
|
|
"primaryKey": false
|
|
},
|
|
"token_group": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"value_status": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": "'ready'",
|
|
"primaryKey": false
|
|
}
|
|
}
|
|
},
|
|
"accounts": {
|
|
"columns": {
|
|
"id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": true
|
|
},
|
|
"site_id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"username": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"access_token": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"api_token": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"balance": {
|
|
"logicalType": "real",
|
|
"notNull": false,
|
|
"defaultValue": "0",
|
|
"primaryKey": false
|
|
},
|
|
"balance_used": {
|
|
"logicalType": "real",
|
|
"notNull": false,
|
|
"defaultValue": "0",
|
|
"primaryKey": false
|
|
},
|
|
"quota": {
|
|
"logicalType": "real",
|
|
"notNull": false,
|
|
"defaultValue": "0",
|
|
"primaryKey": false
|
|
},
|
|
"unit_cost": {
|
|
"logicalType": "real",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"value_score": {
|
|
"logicalType": "real",
|
|
"notNull": false,
|
|
"defaultValue": "0",
|
|
"primaryKey": false
|
|
},
|
|
"status": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": "'active'",
|
|
"primaryKey": false
|
|
},
|
|
"checkin_enabled": {
|
|
"logicalType": "boolean",
|
|
"notNull": false,
|
|
"defaultValue": "true",
|
|
"primaryKey": false
|
|
},
|
|
"last_checkin_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"last_balance_refresh": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"extra_config": {
|
|
"logicalType": "json",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"created_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": "datetime('now')",
|
|
"primaryKey": false
|
|
},
|
|
"updated_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": "datetime('now')",
|
|
"primaryKey": false
|
|
},
|
|
"is_pinned": {
|
|
"logicalType": "boolean",
|
|
"notNull": false,
|
|
"defaultValue": "false",
|
|
"primaryKey": false
|
|
},
|
|
"sort_order": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": "0",
|
|
"primaryKey": false
|
|
},
|
|
"oauth_provider": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"oauth_account_key": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"oauth_project_id": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
}
|
|
}
|
|
},
|
|
"checkin_logs": {
|
|
"columns": {
|
|
"id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": true
|
|
},
|
|
"account_id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"status": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"message": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"reward": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"created_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": "datetime('now')",
|
|
"primaryKey": false
|
|
}
|
|
}
|
|
},
|
|
"downstream_api_keys": {
|
|
"columns": {
|
|
"id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": true
|
|
},
|
|
"name": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"key": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"description": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"enabled": {
|
|
"logicalType": "boolean",
|
|
"notNull": false,
|
|
"defaultValue": "true",
|
|
"primaryKey": false
|
|
},
|
|
"expires_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"max_cost": {
|
|
"logicalType": "real",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"used_cost": {
|
|
"logicalType": "real",
|
|
"notNull": false,
|
|
"defaultValue": "0",
|
|
"primaryKey": false
|
|
},
|
|
"max_requests": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"used_requests": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": "0",
|
|
"primaryKey": false
|
|
},
|
|
"supported_models": {
|
|
"logicalType": "json",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"allowed_route_ids": {
|
|
"logicalType": "json",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"site_weight_multipliers": {
|
|
"logicalType": "json",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"last_used_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"created_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": "datetime('now')",
|
|
"primaryKey": false
|
|
},
|
|
"updated_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": "datetime('now')",
|
|
"primaryKey": false
|
|
},
|
|
"group_name": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"tags": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
}
|
|
}
|
|
},
|
|
"events": {
|
|
"columns": {
|
|
"id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": true
|
|
},
|
|
"type": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"title": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"message": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"level": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": "'info'",
|
|
"primaryKey": false
|
|
},
|
|
"read": {
|
|
"logicalType": "boolean",
|
|
"notNull": false,
|
|
"defaultValue": "false",
|
|
"primaryKey": false
|
|
},
|
|
"related_id": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"related_type": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"created_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": "datetime('now')",
|
|
"primaryKey": false
|
|
}
|
|
}
|
|
},
|
|
"model_availability": {
|
|
"columns": {
|
|
"id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": true
|
|
},
|
|
"account_id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"model_name": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"available": {
|
|
"logicalType": "boolean",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"latency_ms": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"checked_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": "datetime('now')",
|
|
"primaryKey": false
|
|
},
|
|
"is_manual": {
|
|
"logicalType": "boolean",
|
|
"notNull": false,
|
|
"defaultValue": "false",
|
|
"primaryKey": false
|
|
}
|
|
}
|
|
},
|
|
"proxy_files": {
|
|
"columns": {
|
|
"id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": true
|
|
},
|
|
"public_id": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"owner_type": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"owner_id": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"filename": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"mime_type": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"purpose": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"byte_size": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"sha256": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"content_base64": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"created_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": "datetime('now')",
|
|
"primaryKey": false
|
|
},
|
|
"updated_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": "datetime('now')",
|
|
"primaryKey": false
|
|
},
|
|
"deleted_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
}
|
|
}
|
|
},
|
|
"proxy_logs": {
|
|
"columns": {
|
|
"id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": true
|
|
},
|
|
"route_id": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"channel_id": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"account_id": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"model_requested": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"model_actual": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"status": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"http_status": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"latency_ms": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"prompt_tokens": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"completion_tokens": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"total_tokens": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"estimated_cost": {
|
|
"logicalType": "real",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"error_message": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"retry_count": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": "0",
|
|
"primaryKey": false
|
|
},
|
|
"created_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": "datetime('now')",
|
|
"primaryKey": false
|
|
},
|
|
"billing_details": {
|
|
"logicalType": "json",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"downstream_api_key_id": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"client_family": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"client_app_id": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"client_app_name": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"client_confidence": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
}
|
|
}
|
|
},
|
|
"proxy_video_tasks": {
|
|
"columns": {
|
|
"id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": true
|
|
},
|
|
"public_id": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"upstream_video_id": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"site_url": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"token_value": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"requested_model": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"actual_model": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"channel_id": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"account_id": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"status_snapshot": {
|
|
"logicalType": "json",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"upstream_response_meta": {
|
|
"logicalType": "json",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"last_upstream_status": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"last_polled_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"created_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": "datetime('now')",
|
|
"primaryKey": false
|
|
},
|
|
"updated_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": "datetime('now')",
|
|
"primaryKey": false
|
|
}
|
|
}
|
|
},
|
|
"route_channels": {
|
|
"columns": {
|
|
"id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": true
|
|
},
|
|
"route_id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"account_id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"token_id": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"source_model": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"priority": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": "0",
|
|
"primaryKey": false
|
|
},
|
|
"weight": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": "10",
|
|
"primaryKey": false
|
|
},
|
|
"enabled": {
|
|
"logicalType": "boolean",
|
|
"notNull": false,
|
|
"defaultValue": "true",
|
|
"primaryKey": false
|
|
},
|
|
"manual_override": {
|
|
"logicalType": "boolean",
|
|
"notNull": false,
|
|
"defaultValue": "false",
|
|
"primaryKey": false
|
|
},
|
|
"success_count": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": "0",
|
|
"primaryKey": false
|
|
},
|
|
"fail_count": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": "0",
|
|
"primaryKey": false
|
|
},
|
|
"total_latency_ms": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": "0",
|
|
"primaryKey": false
|
|
},
|
|
"total_cost": {
|
|
"logicalType": "real",
|
|
"notNull": false,
|
|
"defaultValue": "0",
|
|
"primaryKey": false
|
|
},
|
|
"last_used_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"last_selected_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"last_fail_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"consecutive_fail_count": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": "0",
|
|
"primaryKey": false
|
|
},
|
|
"cooldown_level": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": "0",
|
|
"primaryKey": false
|
|
},
|
|
"cooldown_until": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
}
|
|
}
|
|
},
|
|
"route_group_sources": {
|
|
"columns": {
|
|
"id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": true
|
|
},
|
|
"group_route_id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"source_route_id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
}
|
|
}
|
|
},
|
|
"settings": {
|
|
"columns": {
|
|
"key": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": true
|
|
},
|
|
"value": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
}
|
|
}
|
|
},
|
|
"site_announcements": {
|
|
"columns": {
|
|
"id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": true
|
|
},
|
|
"site_id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"platform": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"source_key": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"title": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"content": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"level": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": "'info'",
|
|
"primaryKey": false
|
|
},
|
|
"source_url": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"starts_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"ends_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"upstream_created_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"upstream_updated_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"first_seen_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": "datetime('now')",
|
|
"primaryKey": false
|
|
},
|
|
"last_seen_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": "datetime('now')",
|
|
"primaryKey": false
|
|
},
|
|
"read_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"dismissed_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"raw_payload": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
}
|
|
}
|
|
},
|
|
"site_disabled_models": {
|
|
"columns": {
|
|
"id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": true
|
|
},
|
|
"site_id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"model_name": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"created_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": "datetime('now')",
|
|
"primaryKey": false
|
|
}
|
|
}
|
|
},
|
|
"sites": {
|
|
"columns": {
|
|
"id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": true
|
|
},
|
|
"name": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"url": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"platform": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"status": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": "'active'",
|
|
"primaryKey": false
|
|
},
|
|
"api_key": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"created_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": "datetime('now')",
|
|
"primaryKey": false
|
|
},
|
|
"updated_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": "datetime('now')",
|
|
"primaryKey": false
|
|
},
|
|
"is_pinned": {
|
|
"logicalType": "boolean",
|
|
"notNull": false,
|
|
"defaultValue": "false",
|
|
"primaryKey": false
|
|
},
|
|
"sort_order": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": "0",
|
|
"primaryKey": false
|
|
},
|
|
"proxy_url": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"use_system_proxy": {
|
|
"logicalType": "boolean",
|
|
"notNull": false,
|
|
"defaultValue": "false",
|
|
"primaryKey": false
|
|
},
|
|
"custom_headers": {
|
|
"logicalType": "json",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"external_checkin_url": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"global_weight": {
|
|
"logicalType": "real",
|
|
"notNull": false,
|
|
"defaultValue": "1",
|
|
"primaryKey": false
|
|
}
|
|
}
|
|
},
|
|
"token_model_availability": {
|
|
"columns": {
|
|
"id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": true
|
|
},
|
|
"token_id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"model_name": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"available": {
|
|
"logicalType": "boolean",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"latency_ms": {
|
|
"logicalType": "integer",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"checked_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": "datetime('now')",
|
|
"primaryKey": false
|
|
}
|
|
}
|
|
},
|
|
"token_routes": {
|
|
"columns": {
|
|
"id": {
|
|
"logicalType": "integer",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": true
|
|
},
|
|
"model_pattern": {
|
|
"logicalType": "text",
|
|
"notNull": true,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"model_mapping": {
|
|
"logicalType": "json",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"enabled": {
|
|
"logicalType": "boolean",
|
|
"notNull": false,
|
|
"defaultValue": "true",
|
|
"primaryKey": false
|
|
},
|
|
"created_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": "datetime('now')",
|
|
"primaryKey": false
|
|
},
|
|
"updated_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": "datetime('now')",
|
|
"primaryKey": false
|
|
},
|
|
"display_name": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"display_icon": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"decision_snapshot": {
|
|
"logicalType": "json",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"decision_refreshed_at": {
|
|
"logicalType": "datetime",
|
|
"notNull": false,
|
|
"defaultValue": null,
|
|
"primaryKey": false
|
|
},
|
|
"routing_strategy": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": "'weighted'",
|
|
"primaryKey": false
|
|
},
|
|
"route_mode": {
|
|
"logicalType": "text",
|
|
"notNull": false,
|
|
"defaultValue": "'pattern'",
|
|
"primaryKey": false
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"indexes": [
|
|
{
|
|
"name": "account_tokens_account_enabled_idx",
|
|
"table": "account_tokens",
|
|
"columns": [
|
|
"account_id",
|
|
"enabled"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "account_tokens_account_id_idx",
|
|
"table": "account_tokens",
|
|
"columns": [
|
|
"account_id"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "account_tokens_enabled_idx",
|
|
"table": "account_tokens",
|
|
"columns": [
|
|
"enabled"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "accounts_oauth_identity_idx",
|
|
"table": "accounts",
|
|
"columns": [
|
|
"oauth_provider",
|
|
"oauth_account_key",
|
|
"oauth_project_id"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "accounts_oauth_provider_idx",
|
|
"table": "accounts",
|
|
"columns": [
|
|
"oauth_provider"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "accounts_site_id_idx",
|
|
"table": "accounts",
|
|
"columns": [
|
|
"site_id"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "accounts_site_status_idx",
|
|
"table": "accounts",
|
|
"columns": [
|
|
"site_id",
|
|
"status"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "accounts_status_idx",
|
|
"table": "accounts",
|
|
"columns": [
|
|
"status"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "checkin_logs_account_created_at_idx",
|
|
"table": "checkin_logs",
|
|
"columns": [
|
|
"account_id",
|
|
"created_at"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "checkin_logs_created_at_idx",
|
|
"table": "checkin_logs",
|
|
"columns": [
|
|
"created_at"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "checkin_logs_status_idx",
|
|
"table": "checkin_logs",
|
|
"columns": [
|
|
"status"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "downstream_api_keys_enabled_idx",
|
|
"table": "downstream_api_keys",
|
|
"columns": [
|
|
"enabled"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "downstream_api_keys_expires_at_idx",
|
|
"table": "downstream_api_keys",
|
|
"columns": [
|
|
"expires_at"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "downstream_api_keys_key_unique",
|
|
"table": "downstream_api_keys",
|
|
"columns": [
|
|
"key"
|
|
],
|
|
"unique": true
|
|
},
|
|
{
|
|
"name": "downstream_api_keys_name_idx",
|
|
"table": "downstream_api_keys",
|
|
"columns": [
|
|
"name"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "events_created_at_idx",
|
|
"table": "events",
|
|
"columns": [
|
|
"created_at"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "events_read_created_at_idx",
|
|
"table": "events",
|
|
"columns": [
|
|
"read",
|
|
"created_at"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "events_type_created_at_idx",
|
|
"table": "events",
|
|
"columns": [
|
|
"type",
|
|
"created_at"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "model_availability_account_available_idx",
|
|
"table": "model_availability",
|
|
"columns": [
|
|
"account_id",
|
|
"available"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "model_availability_account_model_unique",
|
|
"table": "model_availability",
|
|
"columns": [
|
|
"account_id",
|
|
"model_name"
|
|
],
|
|
"unique": true
|
|
},
|
|
{
|
|
"name": "model_availability_model_name_idx",
|
|
"table": "model_availability",
|
|
"columns": [
|
|
"model_name"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "proxy_files_owner_lookup_idx",
|
|
"table": "proxy_files",
|
|
"columns": [
|
|
"owner_type",
|
|
"owner_id",
|
|
"deleted_at"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "proxy_files_public_id_unique",
|
|
"table": "proxy_files",
|
|
"columns": [
|
|
"public_id"
|
|
],
|
|
"unique": true
|
|
},
|
|
{
|
|
"name": "proxy_logs_account_created_at_idx",
|
|
"table": "proxy_logs",
|
|
"columns": [
|
|
"account_id",
|
|
"created_at"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "proxy_logs_client_app_id_created_at_idx",
|
|
"table": "proxy_logs",
|
|
"columns": [
|
|
"client_app_id",
|
|
"created_at"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "proxy_logs_client_family_created_at_idx",
|
|
"table": "proxy_logs",
|
|
"columns": [
|
|
"client_family",
|
|
"created_at"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "proxy_logs_created_at_idx",
|
|
"table": "proxy_logs",
|
|
"columns": [
|
|
"created_at"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "proxy_logs_downstream_api_key_created_at_idx",
|
|
"table": "proxy_logs",
|
|
"columns": [
|
|
"downstream_api_key_id",
|
|
"created_at"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "proxy_logs_model_actual_created_at_idx",
|
|
"table": "proxy_logs",
|
|
"columns": [
|
|
"model_actual",
|
|
"created_at"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "proxy_logs_status_created_at_idx",
|
|
"table": "proxy_logs",
|
|
"columns": [
|
|
"status",
|
|
"created_at"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "proxy_video_tasks_created_at_idx",
|
|
"table": "proxy_video_tasks",
|
|
"columns": [
|
|
"created_at"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "proxy_video_tasks_public_id_unique",
|
|
"table": "proxy_video_tasks",
|
|
"columns": [
|
|
"public_id"
|
|
],
|
|
"unique": true
|
|
},
|
|
{
|
|
"name": "proxy_video_tasks_upstream_video_id_idx",
|
|
"table": "proxy_video_tasks",
|
|
"columns": [
|
|
"upstream_video_id"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "route_channels_account_id_idx",
|
|
"table": "route_channels",
|
|
"columns": [
|
|
"account_id"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "route_channels_route_enabled_idx",
|
|
"table": "route_channels",
|
|
"columns": [
|
|
"route_id",
|
|
"enabled"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "route_channels_route_id_idx",
|
|
"table": "route_channels",
|
|
"columns": [
|
|
"route_id"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "route_channels_route_token_idx",
|
|
"table": "route_channels",
|
|
"columns": [
|
|
"route_id",
|
|
"token_id"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "route_channels_token_id_idx",
|
|
"table": "route_channels",
|
|
"columns": [
|
|
"token_id"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "route_group_sources_group_source_unique",
|
|
"table": "route_group_sources",
|
|
"columns": [
|
|
"group_route_id",
|
|
"source_route_id"
|
|
],
|
|
"unique": true
|
|
},
|
|
{
|
|
"name": "route_group_sources_source_route_id_idx",
|
|
"table": "route_group_sources",
|
|
"columns": [
|
|
"source_route_id"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "site_announcements_read_at_idx",
|
|
"table": "site_announcements",
|
|
"columns": [
|
|
"read_at"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "site_announcements_site_id_first_seen_at_idx",
|
|
"table": "site_announcements",
|
|
"columns": [
|
|
"site_id",
|
|
"first_seen_at"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "site_announcements_site_source_key_unique",
|
|
"table": "site_announcements",
|
|
"columns": [
|
|
"site_id",
|
|
"source_key"
|
|
],
|
|
"unique": true
|
|
},
|
|
{
|
|
"name": "site_disabled_models_site_id_idx",
|
|
"table": "site_disabled_models",
|
|
"columns": [
|
|
"site_id"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "site_disabled_models_site_model_unique",
|
|
"table": "site_disabled_models",
|
|
"columns": [
|
|
"site_id",
|
|
"model_name"
|
|
],
|
|
"unique": true
|
|
},
|
|
{
|
|
"name": "sites_platform_url_unique",
|
|
"table": "sites",
|
|
"columns": [
|
|
"platform",
|
|
"url"
|
|
],
|
|
"unique": true
|
|
},
|
|
{
|
|
"name": "sites_status_idx",
|
|
"table": "sites",
|
|
"columns": [
|
|
"status"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "token_model_availability_available_idx",
|
|
"table": "token_model_availability",
|
|
"columns": [
|
|
"available"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "token_model_availability_model_name_idx",
|
|
"table": "token_model_availability",
|
|
"columns": [
|
|
"model_name"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "token_model_availability_token_available_idx",
|
|
"table": "token_model_availability",
|
|
"columns": [
|
|
"token_id",
|
|
"available"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "token_model_availability_token_model_unique",
|
|
"table": "token_model_availability",
|
|
"columns": [
|
|
"token_id",
|
|
"model_name"
|
|
],
|
|
"unique": true
|
|
},
|
|
{
|
|
"name": "token_routes_enabled_idx",
|
|
"table": "token_routes",
|
|
"columns": [
|
|
"enabled"
|
|
],
|
|
"unique": false
|
|
},
|
|
{
|
|
"name": "token_routes_model_pattern_idx",
|
|
"table": "token_routes",
|
|
"columns": [
|
|
"model_pattern"
|
|
],
|
|
"unique": false
|
|
}
|
|
],
|
|
"uniques": [
|
|
{
|
|
"name": "downstream_api_keys_key_unique",
|
|
"table": "downstream_api_keys",
|
|
"columns": [
|
|
"key"
|
|
]
|
|
},
|
|
{
|
|
"name": "model_availability_account_model_unique",
|
|
"table": "model_availability",
|
|
"columns": [
|
|
"account_id",
|
|
"model_name"
|
|
]
|
|
},
|
|
{
|
|
"name": "proxy_files_public_id_unique",
|
|
"table": "proxy_files",
|
|
"columns": [
|
|
"public_id"
|
|
]
|
|
},
|
|
{
|
|
"name": "proxy_video_tasks_public_id_unique",
|
|
"table": "proxy_video_tasks",
|
|
"columns": [
|
|
"public_id"
|
|
]
|
|
},
|
|
{
|
|
"name": "route_group_sources_group_source_unique",
|
|
"table": "route_group_sources",
|
|
"columns": [
|
|
"group_route_id",
|
|
"source_route_id"
|
|
]
|
|
},
|
|
{
|
|
"name": "site_announcements_site_source_key_unique",
|
|
"table": "site_announcements",
|
|
"columns": [
|
|
"site_id",
|
|
"source_key"
|
|
]
|
|
},
|
|
{
|
|
"name": "site_disabled_models_site_model_unique",
|
|
"table": "site_disabled_models",
|
|
"columns": [
|
|
"site_id",
|
|
"model_name"
|
|
]
|
|
},
|
|
{
|
|
"name": "sites_platform_url_unique",
|
|
"table": "sites",
|
|
"columns": [
|
|
"platform",
|
|
"url"
|
|
]
|
|
},
|
|
{
|
|
"name": "token_model_availability_token_model_unique",
|
|
"table": "token_model_availability",
|
|
"columns": [
|
|
"token_id",
|
|
"model_name"
|
|
]
|
|
}
|
|
],
|
|
"foreignKeys": [
|
|
{
|
|
"table": "account_tokens",
|
|
"columns": [
|
|
"account_id"
|
|
],
|
|
"referencedTable": "accounts",
|
|
"referencedColumns": [
|
|
"id"
|
|
],
|
|
"onDelete": "CASCADE"
|
|
},
|
|
{
|
|
"table": "accounts",
|
|
"columns": [
|
|
"site_id"
|
|
],
|
|
"referencedTable": "sites",
|
|
"referencedColumns": [
|
|
"id"
|
|
],
|
|
"onDelete": "CASCADE"
|
|
},
|
|
{
|
|
"table": "checkin_logs",
|
|
"columns": [
|
|
"account_id"
|
|
],
|
|
"referencedTable": "accounts",
|
|
"referencedColumns": [
|
|
"id"
|
|
],
|
|
"onDelete": "CASCADE"
|
|
},
|
|
{
|
|
"table": "model_availability",
|
|
"columns": [
|
|
"account_id"
|
|
],
|
|
"referencedTable": "accounts",
|
|
"referencedColumns": [
|
|
"id"
|
|
],
|
|
"onDelete": "CASCADE"
|
|
},
|
|
{
|
|
"table": "route_channels",
|
|
"columns": [
|
|
"account_id"
|
|
],
|
|
"referencedTable": "accounts",
|
|
"referencedColumns": [
|
|
"id"
|
|
],
|
|
"onDelete": "CASCADE"
|
|
},
|
|
{
|
|
"table": "route_channels",
|
|
"columns": [
|
|
"route_id"
|
|
],
|
|
"referencedTable": "token_routes",
|
|
"referencedColumns": [
|
|
"id"
|
|
],
|
|
"onDelete": "CASCADE"
|
|
},
|
|
{
|
|
"table": "route_channels",
|
|
"columns": [
|
|
"token_id"
|
|
],
|
|
"referencedTable": "account_tokens",
|
|
"referencedColumns": [
|
|
"id"
|
|
],
|
|
"onDelete": "SET NULL"
|
|
},
|
|
{
|
|
"table": "route_group_sources",
|
|
"columns": [
|
|
"group_route_id"
|
|
],
|
|
"referencedTable": "token_routes",
|
|
"referencedColumns": [
|
|
"id"
|
|
],
|
|
"onDelete": "CASCADE"
|
|
},
|
|
{
|
|
"table": "route_group_sources",
|
|
"columns": [
|
|
"source_route_id"
|
|
],
|
|
"referencedTable": "token_routes",
|
|
"referencedColumns": [
|
|
"id"
|
|
],
|
|
"onDelete": "CASCADE"
|
|
},
|
|
{
|
|
"table": "site_announcements",
|
|
"columns": [
|
|
"site_id"
|
|
],
|
|
"referencedTable": "sites",
|
|
"referencedColumns": [
|
|
"id"
|
|
],
|
|
"onDelete": "CASCADE"
|
|
},
|
|
{
|
|
"table": "site_disabled_models",
|
|
"columns": [
|
|
"site_id"
|
|
],
|
|
"referencedTable": "sites",
|
|
"referencedColumns": [
|
|
"id"
|
|
],
|
|
"onDelete": "CASCADE"
|
|
},
|
|
{
|
|
"table": "token_model_availability",
|
|
"columns": [
|
|
"token_id"
|
|
],
|
|
"referencedTable": "account_tokens",
|
|
"referencedColumns": [
|
|
"id"
|
|
],
|
|
"onDelete": "CASCADE"
|
|
}
|
|
]
|
|
}
|