ERROR: type "datetime" does not exist
Your framework needs to generate DDL that uses "timestamp" rather than "datetime".
When any application framework generates the wrong data types for SQL DDL, the most likely problem is that it's configured to use the wrong database. In your case, it's likely still configured to use MySQL. Reconfigure for PostgreSQL.
PostgreSQL doesn't have datetime data type. For a combination of both you need "timestamp without time zone".