mirror of
https://github.com/outline/outline.git
synced 2026-06-28 18:54:24 +03:00
68a469daa7
* Add 'externalId' property on groups * Remove clientside Field decorator * Allow querying by externalId
25 lines
1.0 KiB
JavaScript
25 lines
1.0 KiB
JavaScript
"use strict";
|
|
|
|
/** @type {import('sequelize-cli').Migration} */
|
|
module.exports = {
|
|
async up(queryInterface, Sequelize) {
|
|
await queryInterface.sequelize.transaction(async transaction => {
|
|
await queryInterface.addColumn("groups", "externalId", {
|
|
type: Sequelize.STRING,
|
|
}, { transaction });
|
|
await queryInterface.addIndex("groups", ["externalId"], { transaction });
|
|
await queryInterface.addIndex("group_permissions", ["documentId"], { transaction });
|
|
await queryInterface.addIndex("group_permissions", ["sourceId"], { transaction });
|
|
});
|
|
},
|
|
|
|
async down(queryInterface, Sequelize) {
|
|
await queryInterface.sequelize.transaction(async transaction => {
|
|
await queryInterface.removeIndex("group_permissions", ["sourceId"], { transaction });
|
|
await queryInterface.removeIndex("group_permissions", ["documentId"], { transaction });
|
|
await queryInterface.removeIndex("groups", ["externalId"], { transaction });
|
|
await queryInterface.removeColumn("groups", "externalId", { transaction });
|
|
});
|
|
},
|
|
};
|