text: 'use strict';
  module.exports = {
    up: function(queryInterface, Sequelize) {
      return queryInterface.createTable('Contacts', {
        contactId: {
          type: Sequelize.UUID,
          defaultValue: Sequelize.UUIDV4,
          primaryKey: true,
          unique: true,
          validate: {
            isUUID: {
              args: 4,
              msg: 'id must be uuid'
            }
          },
        },
        ownerId: {
          type: Sequelize.UUID,
          allowNull: false,
          onDelete: 'CASCADE',
          primaryKey: true,
          references: {
            model: 'Users',
            key: 'id'
          }
        },
        createdAt: {
          allowNull: false,
          type: Sequelize.DATE
        },
        updatedAt: {
          allowNull: false,
          type: Sequelize.DATE
        }
      });
    },
    down: function(queryInterface, Sequelize) {
      return queryInterface.dropTable('Contacts');
    }
  };