You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
824 B
33 lines
824 B
'use strict';
|
|
|
|
/** @type {import('sequelize-cli').Migration} */
|
|
module.exports = {
|
|
async up (queryInterface, Sequelize) {
|
|
const transaction = await queryInterface.sequelize.transaction();
|
|
try {
|
|
await queryInterface.addColumn(
|
|
'RaceResults',
|
|
'replayHash',
|
|
{
|
|
type: Sequelize.STRING,
|
|
},
|
|
{ transaction }
|
|
);
|
|
await transaction.commit();
|
|
} catch (err) {
|
|
await transaction.rollback();
|
|
throw err;
|
|
}
|
|
},
|
|
|
|
async down (queryInterface, Sequelize) {
|
|
const transaction = await queryInterface.sequelize.transaction();
|
|
try {
|
|
await queryInterface.removeColumn('RaceResults', 'replayHash', { transaction });
|
|
await transaction.commit();
|
|
} catch (err) {
|
|
await transaction.rollback();
|
|
throw err;
|
|
}
|
|
}
|
|
};
|
|
|