Skip to content

Commit

Permalink
Fix louislam#5087 and fix migration state (louislam#5260)
Browse files Browse the repository at this point in the history
  • Loading branch information
louislam authored Oct 27, 2024
1 parent 46d8744 commit 277d6fe
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions db/knex_migrations/2024-11-27-1927-fix-info-json-data-type.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Update info_json column to LONGTEXT mainly for MariaDB
exports.up = function (knex) {
return knex.schema
.alterTable("monitor_tls_info", function (table) {
table.text("info_json", "longtext").alter();
});
};

exports.down = function (knex) {
return knex.schema.alterTable("monitor_tls_info", function (table) {
table.text("info_json", "text").alter();
});
};
4 changes: 2 additions & 2 deletions server/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -775,8 +775,6 @@ class Database {
await migrationServer.start(port, hostname);
}

await Settings.set("migrateAggregateTableState", "migrating");

log.info("db", "Migrating Aggregate Table");

log.info("db", "Getting list of unique monitors");
Expand All @@ -799,6 +797,8 @@ class Database {
}
}

await Settings.set("migrateAggregateTableState", "migrating");

let progressPercent = 0;
let part = 100 / monitors.length;
let i = 1;
Expand Down

0 comments on commit 277d6fe

Please sign in to comment.