text: 'use strict';
  
  module.exports = {
    async up (queryInterface, Sequelize) {
      await queryInterface.createTable('tb_measures', {
        id: {
          type: Sequelize.INTEGER,
          primaryKey: true,
          autoIncrement: true,
          allowNull: false
        },
        tb_user_id: {
          type: Sequelize.INTEGER,
          primaryKey: true,
          allowNull: false,
          references: { model: 'tb_users', key: 'id'},
          onUpdate: 'CASCADE',
          onDelete: 'CASCADE'
        },
        description: {
          type: Sequelize.STRING,
          allowNull: false
        },
        abbreviation: {
          type: Sequelize.STRING,
          allowNull: true
        },
        created_at: {
          type: Sequelize.DATE,
          allowNull: false
        },
        updated_at: {
          type: Sequelize.DATE,
          allowNull: false
        }
      });
    },
  
    async down (queryInterface, Sequelize) {
      await queryInterface.dropTable('tb_measures');
    }
  };
  