DB table creation on reactivation – dbDelta errors on CONSTRAINTS
dbDelta() doesn’t properly parse or compare foreign key constraints — it’s built to detect differences in columns, indexes, and primary keys, but it doesn’t have full logic to recognise existing CONSTRAINT … FOREIGN KEY clauses. The result is that on the second activation it sees your CONSTRAINT line as “missing” and tries to run something … Read more