chage scaffold to create relation for tables at beginning