Adding foreign key to existing table using Migrations |
Hi,
Thanks for the great release of CI 4. Its wonderful. I recently started working with CI 4 over CI 3. I love the way migrations are setup. However I feel it lacks some functionality or not sure if I don't understand it. I am trying to add a few foreign keys to an existing table. But I couldn't find anything in documentation except adding foreign keys while creating a new table. Can someone please point me into the right direction. Thanks
Have you found a solution?
I don't know why it's only possible at the creation of the table. Hey, if you want, I made this and it seems to work perfectly. PHP Code: <?php namespace App\Database;
(05-07-2020, 12:22 AM)wntechs Wrote:(05-06-2020, 11:55 PM)RedskyThirty Wrote: Have you found a solution? Take a look at the edit of my first reply ;-) (05-07-2020, 12:58 AM)RedskyThirty Wrote:(05-07-2020, 12:22 AM)wntechs Wrote:(05-06-2020, 11:55 PM)RedskyThirty Wrote: Have you found a solution? Thanks! It works perfectly. PHP Code: <?php namespace App\Database\Migrations; Its work for me in file app/Database/Migrations/2020-12-31-034310_add_iduser_produk.php |
Welcome Guest, Not a member yet? Register Sign In |