Fixes bug where custom fields would not store new name in custom fields table on edit
This commit is contained in:
parent
b6a1e0d12f
commit
36cbffa183
1 changed files with 8 additions and 1 deletions
|
@ -62,9 +62,16 @@ class CustomField extends Model
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Schema::table(CustomField::$table_name, function ($table) use ($custom_field) {
|
|
||||||
|
Schema::table(CustomField::$table_name, function ($table) use ($custom_field) {
|
||||||
$table->renameColumn($custom_field->convertUnicodeDbSlug($custom_field->getOriginal("name")), $custom_field->convertUnicodeDbSlug());
|
$table->renameColumn($custom_field->convertUnicodeDbSlug($custom_field->getOriginal("name")), $custom_field->convertUnicodeDbSlug());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$custom_field->db_column = $custom_field->convertUnicodeDbSlug();
|
||||||
|
$custom_field->save();
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue