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:
parent
728776ea4b
commit
6022fe354c
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue