Hi !
I have a problem when generating migrations with models of wich the id is an UUID type
On every migration it will add a changeColumn on the column id but she never changes. (the line is generated if a change is made on the specific table)
For example I have plenty of models, all with an UUID as an id column. I change the table named product by only removing a 'type' column and here is the code of the generated migration:
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.sequelize.transaction(async (transaction) => {
await queryInterface.changeColumn('products', 'id',{'type':Sequelize.DataTypes.UUID,'allowNull':false,'primaryKey':true}, {transaction});
await queryInterface.removeColumn('products', 'type', {transaction});
});
},down: async (queryInterface, Sequelize) => {
await queryInterface.sequelize.transaction(async (transaction) => {
await queryInterface.changeColumn('products', 'id',{'type':Sequelize.DataTypes.UUID,'allowNull':false,'primaryKey':true}, {transaction});
await queryInterface.addColumn('products', 'type',{'type':Sequelize.DataTypes.ENUM('A','B')}, {transaction});
});
},
};
Not sure of what is the problem.
In any case, thanks for your project that saves me a lot of time !
Hi !
I have a problem when generating migrations with models of wich the id is an UUID type
On every migration it will add a changeColumn on the column id but she never changes. (the line is generated if a change is made on the specific table)
For example I have plenty of models, all with an UUID as an id column. I change the table named product by only removing a 'type' column and here is the code of the generated migration:
Not sure of what is the problem.
In any case, thanks for your project that saves me a lot of time !