fixing create_table so it can handle primary/foreign key fields