mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 01:40:21 +08:00
Add multi-database data layer
Introduce aether-data-schema and driver-specific schema generation for Postgres, MySQL, and SQLite. Split data backends, lifecycle, repositories, and gateway runtime integration across database drivers. Verified with cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings, and cargo test --workspace.
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
-- Generated by aether-data-schema from schema/logical/*.toml.
|
||||
-- Do not edit generated files directly; edit logical schema or explicit overrides instead.
|
||||
|
||||
CREATE TABLE IF NOT EXISTS proxy_nodes (
|
||||
`id` VARCHAR(64) NOT NULL,
|
||||
`name` VARCHAR(255) NOT NULL,
|
||||
`ip` VARCHAR(512) NOT NULL,
|
||||
`port` INT NOT NULL,
|
||||
`region` VARCHAR(100),
|
||||
`status` VARCHAR(32) NOT NULL DEFAULT 'online',
|
||||
`registered_by` VARCHAR(64),
|
||||
`last_heartbeat_at` BIGINT,
|
||||
`heartbeat_interval` INT NOT NULL DEFAULT 30,
|
||||
`active_connections` INT NOT NULL DEFAULT 0,
|
||||
`total_requests` BIGINT NOT NULL DEFAULT 0,
|
||||
`avg_latency_ms` DOUBLE,
|
||||
`is_manual` TINYINT(1) NOT NULL DEFAULT 0,
|
||||
`proxy_url` VARCHAR(500),
|
||||
`proxy_username` VARCHAR(255),
|
||||
`proxy_password` VARCHAR(500),
|
||||
`created_at` BIGINT NOT NULL,
|
||||
`updated_at` BIGINT NOT NULL,
|
||||
`remote_config` JSON,
|
||||
`config_version` INT NOT NULL DEFAULT 0,
|
||||
`hardware_info` JSON,
|
||||
`estimated_max_concurrency` INT,
|
||||
`tunnel_mode` TINYINT(1) NOT NULL DEFAULT 0,
|
||||
`tunnel_connected` TINYINT(1) NOT NULL DEFAULT 0,
|
||||
`tunnel_connected_at` BIGINT,
|
||||
`failed_requests` BIGINT NOT NULL DEFAULT 0,
|
||||
`dns_failures` BIGINT NOT NULL DEFAULT 0,
|
||||
`stream_errors` BIGINT NOT NULL DEFAULT 0,
|
||||
`proxy_metadata` JSON,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS proxy_node_events (
|
||||
`id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`node_id` VARCHAR(64) NOT NULL,
|
||||
`event_type` VARCHAR(64) NOT NULL,
|
||||
`detail` VARCHAR(500),
|
||||
`created_at` BIGINT NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user