Merge pull request from marcusmoore/fixes/update-custom-fields

Fixed renaming custom fields
This commit is contained in:
snipe 2025-02-26 07:03:40 +00:00 committed by GitHub
commit 5e3855ee5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -149,11 +149,6 @@ class CustomField extends Model
return true;
}
// This is just a dumb thing we have to include because Laraval/Doctrine doesn't
// play well with enums or a table that EVER had enums. :(
$platform = Schema::getConnection()->getDoctrineSchemaManager()->getDatabasePlatform();
$platform->registerDoctrineTypeMapping('enum', 'string');
// Rename the field if the name has changed
Schema::table(self::$table_name, function ($table) use ($custom_field) {
$table->renameColumn($custom_field->convertUnicodeDbSlug($custom_field->getOriginal('name')), $custom_field->convertUnicodeDbSlug());