-
How can we set a column as "ON UPDATE CURRENT_TIMESTAMP(3)"; |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
I don't think you need to. Have you tried without and tested what happens? |
Beta Was this translation helpful? Give feedback.
-
Hi, @jyxjjj You can specify $precision argument when you define a column. The exactly same precision is used in CURRENT_TIMESTAMP(). |
Beta Was this translation helpful? Give feedback.
-
Even I think it is an correct answer, but i don't like laravel's migrations at all any more. |
Beta Was this translation helpful? Give feedback.
Hi, @jyxjjj
You can specify $precision argument when you define a column. The exactly same precision is used in CURRENT_TIMESTAMP().
$table->timestamp('precise_timestamp_column', 3)->useCurrentOnUpdate();