Warning about Timestamp when performing migrations

We are using fast api and sqlalchemy in our project. When i perform migration i get following warning

WARNI [asyncmy] Feature ‘TIMESTAMP type with conflicting scale’ is not supported by SingleStore. Execution will continue, but the DEFAULT and/or ON UPDATE timestamp scale will match the declared value of column ‘created_date’. To avoid this warning, change the scale of your DEFAULT and/or ON UPDATE expression to match the declared column type.

Everething working correct but this warning bothers me. Whats problem? could anybody explain me? is it related to singlestore??

It looks like your app set the TIMESTAMP default precision/scale to 6. You want to use (6) explicitly in the following code when CURRENT_TIMESTAMP is used, ie CURRENT_TIMESTAMP(6), CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)) to match that. I think this is what that warning message is saying, ie the setting 6 is conflicting with the default, which is 0. Let me know if this helps.

1 Like

Yes, you absolutely right. Thanks!