@flowfuse/flowfuse
Version:
An open source low-code development platform
25 lines (23 loc) • 879 B
JavaScript
/**
* Add TeamBrokerAgents table
*/
const { DataTypes } = require('sequelize')
module.exports = {
up: async (context) => {
await context.createTable('TeamBrokerAgents', {
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
state: { type: DataTypes.STRING, allowNull: false, default: 'running' },
settings: { type: DataTypes.TEXT, allowNull: true },
auth: { type: DataTypes.STRING, allowNull: false },
createdAt: { type: DataTypes.DATE, allowNull: false },
updatedAt: { type: DataTypes.DATE, allowNull: false },
TeamId: {
type: DataTypes.INTEGER,
references: { model: 'Teams', key: 'id' },
onDelete: 'CASCADE',
onUpdate: 'CASCADE'
}
})
},
down: async (context) => {}
}