CoastalCommitsPastes/server/migrations/20220323033259-postAddHtmlColumn.js
2022-03-22 21:18:26 -07:00

27 lines
410 B
JavaScript

const { DataTypes } = require("sequelize");
async function up(qi) {
try {
await qi.addColumn("Posts", "html", {
allowNull: true,
type: DataTypes.STRING,
});
} catch (e) {
console.error(e);
throw e;
}
}
async function down(qi) {
try {
await qi.removeColumn("Posts", "html");
} catch (e) {
console.error(e);
throw e;
}
}
module.exports = {
up,
down,
};