BZ-1076696 - Schema problems with DDL scripts

(cherry picked from commit 43b691033403bf91e57e09fffc06b2e88df35445)