petl-developers / petlx

Optional extensions for petl based on third party libraries.
MIT License
44 stars 9 forks source link

'datetime' data creates table columns of type 'date' #66

Closed ianfiske closed 10 years ago

ianfiske commented 10 years ago

The petlx.sql.make_sqlalchemy_column function incorrectly returns a Date column when passed an array of datetime objects:

make_sqlalchemy_column([datetime(2014, 1, 1, 1, 1, 1, 1), datetime(2014, 1, 1, 1, 1, 1, 2)], 'name')

returns a Date() column. It should return a DateTime() column. I've added a pull request that fixes this.