dbDelta support for FOREIGN KEY

Do I really have to live with that until dbDelta supports FOREIGN KEY?

Quite frankly, yes. But that’s the beauty of open source – anyone is welcome to post a patch!

However, expanding it to cover other aspects of schema design would almost certainly incur unwanted complexity & heighten the possibility of failure – something the core team will strongly consider beforehand.

I would take @xav0989’s advice – use dbDelta for it’s intention (basic table implementation, column additions & adjustments), and handle the additional features with $wpdb.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)