Scaffold and foreign keys


#1

Hello,
I create a migration to add a foreign key ‘page_id’ to a table
‘main_sections’. After running the migration and adding the column,
the scaffol that I have on the main_setions table does not add the
foreign key into the CRUD.

Any ideas why this is the case?

Thanks.


#2

I think you have to re-run scaffolding to see anything new. It’s a
generator, and creates a static snapshot of the current structure,
not a run-time-automatic-introspecting view which would update each
time something changed about the structure.

Walter


#3

Thanks, I’ll try that…