fix(migrations): skip redundant map marker column migration on fresh installs.

The create_map_markers_table migration already adds icon and visibility fields, so the follow-up alter migration now no-ops when those columns exist.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Kenneth Brewer 2026-07-18 00:47:14 -04:00
parent 728776ea4b
commit 6022fe354c
1 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,11 @@ export default class AddVisibilityAndIconFieldsToMapMarkers extends BaseSchema {
protected tableName = 'map_markers'
async up() {
// create_map_markers_table now includes these columns on fresh installs.
if (await this.schema.hasColumn(this.tableName, 'custom_color')) {
return
}
this.schema.alterTable(this.tableName, (table) => {
table.string('custom_color', 7).nullable()
table.string('icon', 50).nullable()