Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14346

DBForge to support foreign keys

$
0
0
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
Example:
`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)

Thanks

Viewing all articles
Browse latest Browse all 14346

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>