Toad World® Forums

Low-Priority Suggestion on Schema Compare


#1

Sometimes during development we find that the original design of a table wasn’t exctly right. We need to tweak something, maybe add a column, increase the size of a column, rename a column, change a column type, etc.

When we do this, there usually is no data in the table. Consequently, there is no risk in dropping the table and recreating it. TOAD still goes through the motions of renaming the table, creating a new version, and then copying the contents of the (completely empty) old table over to the new table.

Can that be wrapped in a simple IF conditional, to skip the table rename and content copy steps? IF COUNT(*) = 0 THEN don’t bother with the whole table rename and content copy stuff.

Not a big deal, but it might simplify the whole SQL script creation process, at least for the empty tables. And, since simpler = lower chance of issues, it should help improve the reliability of the whole process.


#2

Hi Jonathan,
In Alter Table dialog we do have such option on Options tab Keep Data. Do you want to have similar option in Schema Compare?
Or you want this should be more intelligence and analyze table data as you suggested? So it will be ‘Keep data for non-empty tables’.

Regards,
Alex

Message was edited by: Alexander.Maximov


#3

The latter - keep data for non-empty tables.


#4

I’ve created CR107110 to implement it in the way to keep current behavior for consistency:
Keep data (checkbox, checked by default)

  • for all tables (radio button, selected by default)
  • for non-empty tables only (radio button)

#5

Looks good! Thanks Alexander!