Fix notification metadata field name in migration to ensure proper updates
This commit is contained in:
parent
cdcde095dd
commit
25d4fbfc1d
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ func (m MigrateFixNotificationMetadataExperimentModal20241212) Up(ctx context.Co
|
||||||
return db.Transaction(func(tx *gorm.DB) error {
|
return db.Transaction(func(tx *gorm.DB) error {
|
||||||
// Update all chore where notification metadata is a null stirng 'null' to empty json {}:
|
// Update all chore where notification metadata is a null stirng 'null' to empty json {}:
|
||||||
|
|
||||||
if err := tx.Table("chores").Where("notification_metadata = ?", "null").Update("notification_metadata", "{}").Error; err != nil {
|
if err := tx.Table("chores").Where("notification_meta = ?", "null").Update("notification_meta", "{}").Error; err != nil {
|
||||||
log.Errorf("Failed to update chores with null notification metadata: %v", err)
|
log.Errorf("Failed to update chores with null notification metadata: %v", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue