updated code to allow for auto-inc of primary key feature for the image
related tables.