nuodb / migration-tools

Migration tools for NuoDB
http://nuodb.github.com/migration-tools/
BSD 3-Clause "New" or "Revised" License
27 stars 10 forks source link

default value of CURRENT_TIMESTAMP from mysql is not migrated correctly #4

Closed akshah123 closed 11 years ago

akshah123 commented 11 years ago

At present, if mysql table has following:

last_modified_date TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP

It gets migrated to this syntax:

last_modified_date TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP

However, nuodb doesn't allow CURRENT_TIMESTAMP magic parameter. This needs to be instead outputted as:

last_modified_date timestamp NOT NULL DEFAULT('now')

plothridge commented 11 years ago

This is something we should manage automatically during the schema translation step. There may be many more of these types of issues going forward, so there should be a way to incorporate such changes easily. The tool should be made extensible, so a customer can do this without having to write code.