This Script uses as datatype on some positions "datetime".
But this is an mysql datatype.
The postgres datatype must be "timestamp".
After changing "datetime" to "timestamp" the script
It's the same error which appears in the acid