UNPKG

@flowfuse/flowfuse

Version:

An open source low-code development platform

25 lines (23 loc) 843 B
/** * Add description ProjectSnapshots table */ const { DataTypes } = require('sequelize') module.exports = { up: async (context) => { const table = await context.describeTable('ProjectSnapshots') // Due to a previous bug, it is possible that some dev instances // have a complete ProjectSnapshots table generated by the model // and not the migration. When that bug is fixed, this migration // will get applied. So we need to make sure we only try to add // the column if it doesn't already exist if (table.description === undefined) { await context.addColumn('ProjectSnapshots', 'description', { type: DataTypes.TEXT, default: '', allowNull: true }) } }, down: async (context) => { } }