Fixed DB creation sql

Foreign key error -- reference to an ID that cannot exist