Files
nx9-wg/crates/nx9-wg-db/migrations/0004_interface_roles.sql
T
2026-09-02 15:19:19 +05:30

7 lines
322 B
SQL

-- 0004_interface_roles.sql
-- Explicit WireGuard Interface Role: Overlay (primary client network) or Upstream (third-party VPN tunnel)
ALTER TABLE interfaces ADD COLUMN role TEXT NOT NULL DEFAULT 'overlay' CHECK (role IN ('overlay', 'upstream'));
UPDATE interfaces SET role = 'overlay' WHERE role IS NULL OR role = '';