38463-vm/backend/src/db/migrations/20260216182021-add-attributes-to-trials.js
2026-02-16 19:08:10 +00:00

22 lines
560 B
JavaScript

'use strict';
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.addColumn('trials', 'attributes', {
type: Sequelize.JSONB,
allowNull: true,
defaultValue: {},
});
await queryInterface.addColumn('trials', 'trial_category', {
type: Sequelize.STRING,
allowNull: false,
defaultValue: 'PLANT',
});
},
down: async (queryInterface) => {
await queryInterface.removeColumn('trials', 'attributes');
await queryInterface.removeColumn('trials', 'trial_category');
},
};