chore: Move to Typescript (#2783)
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
This commit is contained in:
@@ -1,35 +1,34 @@
|
||||
module.exports = {
|
||||
up: async (queryInterface, Sequelize) => {
|
||||
await queryInterface.changeColumn('events', 'data', {
|
||||
await queryInterface.changeColumn("events", "data", {
|
||||
type: Sequelize.JSONB,
|
||||
allowNull: true,
|
||||
});
|
||||
await queryInterface.addColumn('events', 'actorId', {
|
||||
await queryInterface.addColumn("events", "actorId", {
|
||||
type: Sequelize.UUID,
|
||||
allowNull: true,
|
||||
references: {
|
||||
model: 'users',
|
||||
model: "users",
|
||||
},
|
||||
});
|
||||
await queryInterface.addColumn('events', 'modelId', {
|
||||
await queryInterface.addColumn("events", "modelId", {
|
||||
type: Sequelize.UUID,
|
||||
allowNull: true
|
||||
allowNull: true,
|
||||
});
|
||||
await queryInterface.addColumn('events', 'ip', {
|
||||
await queryInterface.addColumn("events", "ip", {
|
||||
type: Sequelize.STRING,
|
||||
allowNull: true
|
||||
allowNull: true,
|
||||
});
|
||||
await queryInterface.addIndex('events', ['name']);
|
||||
await queryInterface.addIndex('events', ['actorId']);
|
||||
await queryInterface.addIndex('events', ['teamId', 'collectionId']);
|
||||
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']);
|
||||
}
|
||||
}
|
||||
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"]);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user