Custom script to replace "Generate Change Script"?

We’re a new Toad customer (6.3.2.2.1) working with PostgreSQL 9.6 and trying to verify that our development, testing, and production database structures are synchronized with the model. We’ve run into issues where the Generate Change Script wizard doesn’t correctly identify objects that are the same (current_timestamp with now(), BigSerial with BigInt with default nextval, etc.). Have other users been able to create a replacement model action for the wizard? Is there another way of doing the compares that would reduce or eliminate false positives?

Thank you,

Steven Smith

Hello,

at this time it is not possible reduce differences in comparator tree. You can replace value in model by simple macro or update model from database to reduce differences.

What you can modify is change script. It is mean that you still will see differences in tree, but no change script will be generated (I Attached example package). This package works for CURRENT_DATE and CURRENT_TIMESTAMP. Bigserial is more complicated problem, because database create sequence, set default value to column, change not null flag and change data type. Unfortunately there no way to determine if this is created by database or manually by user.

Daril
PGAlterScriptUser.zip (1.41 KB)

Daril,

Thank you for the script, it works as advertised.

Apparently the “Generate Change Script” filter on the differences screen can’t filter on “BigSerial” as a value either. Hopefully that will be fixed in a future release.

Thank you,

Steven Smith