fp/packages/strapi-borked/database/migrations/2023-09-08-drop-toys-image.js

12 lines
273 B
JavaScript
Raw Normal View History

2024-07-04 21:20:29 +00:00
module.exports = {
async up(knex) {
const hasColumn = await knex.schema.hasColumn('toys', 'image');
if (hasColumn) {
await knex.schema.table('toys', (table) => {
table.dropColumn('image');
});
}
}
};