How to add column with foreign key within migration? |
I would like to add new column in database within migration, but I want to add also foreign key.
I already have a table devices and I want to add column customer_id with relation to customers table. Here is a migration PHP Code: <?php But when I ran php spark migrate -all I'm getting Code: Field `customer_id` not found. and migration fail. |
Messages In This Thread |
How to add column with foreign key within migration? - by jozefrebjak - 11-03-2022, 02:18 AM
RE: How to add column with foreign key within migration? - by InsiteFX - 11-04-2022, 12:37 AM
RE: How to add column with foreign key within migration? - by jozefrebjak - 11-20-2022, 12:08 AM
RE: How to add column with foreign key within migration? - by kenjis - 11-20-2022, 04:25 AM
|