Files
3x-ui/web
MHSanaei 998fa0dfe1 fix(postgres): stop FK constraint from blocking inbound delete
The schema was written for SQLite, which never enforces foreign keys, so
relationships are managed in application code and deleting an inbound keeps
its client_traffics by design. On Postgres GORM auto-created the
fk_inbounds_client_stats constraint, which rejected those deletes with
SQLSTATE 23503.

Set DisableForeignKeyConstraintWhenMigrating so neither backend creates the
constraint, and drop the already-created one on existing Postgres DBs via
dropLegacyForeignKeys. Also revert the client_traffics deletion that
c20ee00f added to DelInbound so traffic is preserved.
2026-05-31 21:45:41 +02:00
..
2026-05-19 12:20:24 +02:00
v3
2026-05-10 02:13:42 +02:00