Files
EvoFirewall/packages/db/migrations/003_install_links.sql
T
DenozordecandCursor ef56da4d91
Build and Push EvoFirewall Docker Image / build-and-push (push) Successful in 1m37s
Build and Push EvoFirewall Docker Image / create-release (push) Skipped
feat(api, web): implement short install link functionality for agents
- Added new API endpoints for creating, retrieving, and revoking install links for agents.
- Enhanced the agent installation process with short links accessible via `/agent-install/:id` and `/:slug`.
- Updated the README and documentation to reflect the new installation method and usage instructions.
- Refactored relevant components in the web application to support the new install link feature.
- Improved error handling and validation for install link operations.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-21 01:25:05 +07:00

20 lines
629 B
SQL

-- Agent install short-links (one-liner invites)
CREATE TABLE IF NOT EXISTS agent_install_links (
id TEXT PRIMARY KEY,
slug TEXT NOT NULL UNIQUE,
client_name TEXT NOT NULL,
platform TEXT NOT NULL DEFAULT 'linux',
created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')),
revoked_at TEXT,
last_used_at TEXT,
use_count INTEGER NOT NULL DEFAULT 0,
CHECK (platform IN ('linux', 'mikrotik')),
CHECK (length(trim(client_name)) > 0),
CHECK (length(trim(id)) > 0),
CHECK (length(trim(slug)) > 0)
);
CREATE UNIQUE INDEX IF NOT EXISTS idx_agent_install_links_slug
ON agent_install_links (slug);