Welcome Guest, Not a member yet? Register   Sign In
DBForge to support foreign keys

Currently, I am writing a migration to a database that has foreign keys.
I am using DBForge for all of my creation, deletion, and editing.
I managed to do everything but create/delete foreign keys.

I would like dbforge to include an option:
"add_constraint" or "add_foreign_key" or whatever, that adds a foreign key constraint, and is named with both fields names usiing underscore
`add_constraint("posts", "user_id", "users", "user_id")` -> creates posts_user_id_users_user_id

And `remove_constraint` with the same format.

Is this possible to add in 3.1.1?

(I cannot use db class as I use both mysql and postgres, and they are not fully compatible all the time)


A handful of people have already tried to implement different versions of this ... it's not as easy as it looks like on first glance.

100% not happening in 3.1.1, and I don't see it happening in a 3.1.x either way - micro-version releases aren't supposed to include new features (we do allow some minor ones from time to time, but this one isn't such).

Theme © iAndrew 2016 - Forum software by © MyBB