Adding comment to a column using sequelize

Viewed 4916

Is it possible to create column comments when creating a table using sequelize?

The document here only says that you can add a comment to a table. But how can I add a comment to each column?

The following code doesn't work.

const Project = sequelize.define('project', {
  title: Sequelize.STRING,
  description: Sequelize.TEXT,
  comment: "This is a comment"
})

The way I check whether column comment is successfully added or not is executing SHOW FULL FIELDS FROM table_name.

Here's the version of my mysql server:

innodb_version  5.7.18
protocol_version    10
slave_type_conversions  
tls_version TLSv1,TLSv1.1
version 5.7.18
version_comment MySQL Community Server (GPL)
version_compile_machine x86_64
version_compile_os  Linux
2 Answers

Currently it's works for me

  createdDate: {
    type: Sequelize.INTEGER,
    comment: 'UNIX TIMESTAMP'
  }
Related