Skip to content

MySQL: Sequelize.TIME(3) ignores precision and declares column as time instead of time(3) #8963

Closed

Description

@npapagna

What are you doing?

Im writing a migration that adds a column to a model in which i need to track time with millisecond precision:

//...
duration: {
  allowNull: false,
  type: Sequelize.TIME(3)
},
//...

What do you expect to happen?

I wanted the db schema to be altered and the new column be declared as time(3).

What is actually happening?

The column is declared as time instead of time(3) and thus losing precision.
Note that this is working for columns of type Sequelize.DATE(3).

Dialect: mysql
Dialect version: XXX
Database version: 5.7.21
Sequelize version: 4.32.2
Tested with latest release: yes, 4.32.2

Note : Your issue may be ignored OR closed by maintainers if it's not tested against latest version OR does not follow issue template.

Activity

  1. added
    type: feature
    on Jan 29, 2018
  2. sushantdhiman commented on Jan 29, 2018

    @sushantdhiman
    Contributor

    Time does not support precision at the moment, tagging this as feature request

  3. stale commented on Jul 24, 2019

    @stale
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions