3x-ui/database
abdulrahman 686ca1f637 fix(multi-node): scope tag and email unique constraints per node
inbounds.tag was globally UNIQUE which prevents two remote nodes from having inbounds on the same port. client_traffics.email was globally UNIQUE which causes transaction rollback when different nodes have clients with the same email.

Changed both to composite unique indexes scoped by their parent ((node_id, tag) and (inbound_id, email)). tagExists() is now node-aware so UI tag generation doesn't see remote node tags as conflicts. Adds migrateLegacyUniqueConstraints() to drop old constraints on startup.
2026-05-12 10:54:49 +03:00
..
model fix(multi-node): scope tag and email unique constraints per node 2026-05-12 10:54:49 +03:00
db.go fix(multi-node): scope tag and email unique constraints per node 2026-05-12 10:54:49 +03:00