9 months ago

How to add a foreign key to a table after migration done laravel

Posted 9 months ago by AbdulBazith

Guys i have doubt.

i have a table with 4 columns.

think that, i have a table product with 4 columns product_name, rate, min quantity, date

i have migrated the table so the table is created in phpmyadmin.

but i forget to add product_category_id column in the product table with foreign key.

now how can i add a column product_category_id with foreign key constrain in product table

Kindly some one suggest pelase

Please sign in or create an account to participate in this conversation.