UNPKG

@grouparoo/core

Version:
51 lines (50 loc) 1.51 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = { up: async (queryInterface, DataTypes) => { await queryInterface.createTable("profilePropertyRules", { guid: { type: DataTypes.STRING(40), primaryKey: true, }, createdAt: { type: DataTypes.DATE, allowNull: false, }, updatedAt: { type: DataTypes.DATE, allowNull: false, }, key: { type: DataTypes.STRING(191), allowNull: false, }, type: { type: DataTypes.STRING(191), allowNull: false, }, unique: { type: DataTypes.BOOLEAN, allowNull: false, }, sourceGuid: { type: DataTypes.STRING(40), allowNull: false, }, state: { type: DataTypes.STRING(191), allowNull: false, }, }); await queryInterface.addIndex("profilePropertyRules", ["key"], { fields: ["key"], unique: true, }); await queryInterface.addIndex("profilePropertyRules", ["state"], { fields: ["state"], }); }, down: async (queryInterface) => { await queryInterface.dropTable("profilePropertyRules"); }, };