Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Commit

Permalink
Check for old uses of current_timestamp()
Browse files Browse the repository at this point in the history
Replace with CURRENT_TIMESTAMP
  • Loading branch information
smclenithan committed Oct 19, 2017
1 parent a678003 commit 7656060
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mysql2pgsql/lib/postgres_writer.py
Expand Up @@ -86,6 +86,8 @@ def get_type(column):
elif column['type'] == 'timestamp':
if column['default'] == None:
default = None
elif "current_timestamp()" in column['default']:
default = ' DEFAULT CURRENT_TIMESTAMP'
elif "CURRENT_TIMESTAMP" in column['default']:
default = ' DEFAULT CURRENT_TIMESTAMP'
elif "0000-00-00 00:00" in column['default']:
Expand Down

0 comments on commit 7656060

Please sign in to comment.