EditTableDialog: Fix adding new fields to table

Fix the function to add new columns to an existing table to work
properly with the recent changes.