SQL DDL date type changed to timestamp.
SQL DDL with 'if exists' condition and proper schema search path set.