-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(column constraint): added precision support for current_timestamp
We tend use `CURRENT_TIMESTAMP` with precision support (`CURRENT_TIMESTAMP(3)`). So far I've just created an extra query to change the column's default to `CURRENT_TIMESTAMP(3)` because `db-migrate-mysql` did not support this. If you use `CURRENT_TIMESTAMP(3)` as `onUpdate` or as `defaultValue` you end up `DEFAULT "CURRENT_TIMESTAMP(3)"` (the extra quotes shouldn't be there). So I found (I think) a pretty neat way of handling this. But since there are no tests for `onUpdate` and `defaultValue` with `CURRENT_TIMESTAMP`, can you help what should be the right way to have those? Signed-off-by: Róbert Oroszi <robert@oroszi.net>
- Loading branch information
Showing
2 changed files
with
20 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters