Fixes to allow both PGSQL & MYSQL to create correctly