Initial commit: FunConnect project with server, relay, client and admin panel
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
17
server/migrations/20240101000002_relay_nodes.sql
Normal file
17
server/migrations/20240101000002_relay_nodes.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
-- Relay server nodes registry
|
||||
CREATE TABLE relay_nodes (
|
||||
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||
name VARCHAR(64) NOT NULL,
|
||||
url TEXT NOT NULL UNIQUE,
|
||||
region VARCHAR(32) NOT NULL DEFAULT 'auto',
|
||||
is_active BOOLEAN NOT NULL DEFAULT TRUE,
|
||||
priority INTEGER NOT NULL DEFAULT 0,
|
||||
last_ping_ms INTEGER, -- measured RTT in ms
|
||||
last_checked_at TIMESTAMPTZ,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
||||
);
|
||||
|
||||
-- Seed with official relay nodes
|
||||
INSERT INTO relay_nodes (name, url, region, priority) VALUES
|
||||
('官方节点 - 主线路', 'funmc.com:7900', 'auto', 100),
|
||||
('官方节点 - 备用线路', 'funmc.com:7901', 'auto', 50);
|
||||
Reference in New Issue
Block a user