CoastalCommitsPastes/server/migrations/20220323033259-postAddHtmlColumn.js

28 lines
410 B
JavaScript
Raw Normal View History

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,
};