Added foreign key to weights table.