UNPKG

@grouparoo/core

Version:
74 lines (73 loc) 2.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = { up: async (queryInterface, DataTypes) => { await queryInterface.createTable("exports", { guid: { type: DataTypes.STRING(40), primaryKey: true, }, createdAt: { type: DataTypes.DATE, allowNull: false, }, updatedAt: { type: DataTypes.DATE, allowNull: false, }, profileGuid: { type: DataTypes.STRING(40), allowNull: false, }, destinationGuid: { type: DataTypes.STRING(40), allowNull: false, }, oldProfileProperties: { type: DataTypes.TEXT, allowNull: false, }, newProfileProperties: { type: DataTypes.TEXT, allowNull: false, }, oldGroups: { type: DataTypes.TEXT, allowNull: false, }, newGroups: { type: DataTypes.TEXT, allowNull: false, }, errorMessage: { type: DataTypes.TEXT, allowNull: true, }, toDelete: { type: DataTypes.BOOLEAN, allowNull: false, }, mostRecent: { type: DataTypes.BOOLEAN, allowNull: false, }, startedAt: { type: DataTypes.DATE, allowNull: true, }, completedAt: { type: DataTypes.DATE, allowNull: true, }, }); await queryInterface.addIndex("exports", ["profileGuid"], { fields: ["profileGuid"], }); await queryInterface.addIndex("exports", ["destinationGuid"], { fields: ["destinationGuid"], }); }, down: async (queryInterface) => { await queryInterface.dropTable("exports"); }, };