From 6022fe354cfbc306bfb854441647594ee42c76c5 Mon Sep 17 00:00:00 2001 From: Kenneth Brewer Date: Sat, 18 Jul 2026 00:47:14 -0400 Subject: [PATCH] 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 --- ...00000002_add_visibility_and_icon_fields_to_map_markers.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/admin/database/migrations/1771200000002_add_visibility_and_icon_fields_to_map_markers.ts b/admin/database/migrations/1771200000002_add_visibility_and_icon_fields_to_map_markers.ts index 3b95e08..d2698e8 100644 --- a/admin/database/migrations/1771200000002_add_visibility_and_icon_fields_to_map_markers.ts +++ b/admin/database/migrations/1771200000002_add_visibility_and_icon_fields_to_map_markers.ts @@ -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()