This PR moves the entire project to Typescript. Due to the ~1000 ignores this will lead to a messy codebase for a while, but the churn is worth it – all of those ignore comments are places that were never type-safe previously. closes #1282
35 lines
1.2 KiB
JavaScript
35 lines
1.2 KiB
JavaScript
module.exports = {
|
|
up: async (queryInterface, Sequelize) => {
|
|
await queryInterface.changeColumn("events", "data", {
|
|
type: Sequelize.JSONB,
|
|
allowNull: true,
|
|
});
|
|
await queryInterface.addColumn("events", "actorId", {
|
|
type: Sequelize.UUID,
|
|
allowNull: true,
|
|
references: {
|
|
model: "users",
|
|
},
|
|
});
|
|
await queryInterface.addColumn("events", "modelId", {
|
|
type: Sequelize.UUID,
|
|
allowNull: true,
|
|
});
|
|
await queryInterface.addColumn("events", "ip", {
|
|
type: Sequelize.STRING,
|
|
allowNull: true,
|
|
});
|
|
await queryInterface.addIndex("events", ["name"]);
|
|
await queryInterface.addIndex("events", ["actorId"]);
|
|
await queryInterface.addIndex("events", ["teamId", "collectionId"]);
|
|
},
|
|
down: async (queryInterface, Sequelize) => {
|
|
await queryInterface.removeColumn("events", "actorId");
|
|
await queryInterface.removeColumn("events", "modelId");
|
|
await queryInterface.removeColumn("events", "ip");
|
|
await queryInterface.removeIndex("events", ["name"]);
|
|
await queryInterface.removeIndex("events", ["actorId"]);
|
|
await queryInterface.removeIndex("events", ["teamId", "collectionId"]);
|
|
},
|
|
};
|