Skip to content

Commit fbdca18

Browse files
committed
fix datetime(6) column type
1 parent b84934c commit fbdca18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mysql2pgsql/lib/postgres_writer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def get_type(column):
7373
elif column['type'] == 'double precision':
7474
default = (" DEFAULT %s" % (column['default'] if t(column['default']) else 'NULL')) if t(default) else None
7575
return default, 'double precision'
76-
elif column['type'] == 'datetime':
76+
elif column['type'] == 'datetime' or column['type'].startswith('datetime('):
7777
default = None
7878
if self.tz:
7979
return default, 'timestamp with time zone'

0 commit comments

Comments
 (0)