fix: update the migration js

This commit is contained in:
leonace924
2026-01-05 20:12:37 -05:00
parent c43ba1c8af
commit 94e9005002

View File

@@ -1,8 +1,11 @@
exports.up = function (knex) {
return knex.schema
.alterTable("status_page", function (table) {
exports.up = async function (knex) {
// Check if column already exists (created by knex_init_db.js for fresh installs)
const hasColumn = await knex.schema.hasColumn("status_page", "rss_title");
if (!hasColumn) {
await knex.schema.alterTable("status_page", function (table) {
table.string("rss_title", 255);
});
}
};
exports.down = function (knex) {