Skip to content

A free open source IT asset/license management system

Fix for completely erroneous DBAL error

sniped7f6d8e9971c
diff --git a/database/migrations/2017_01_25_063357_fix_utf8_custom_field_column_names.php b/database/migrations/2017_01_25_063357_fix_utf8_custom_field_column_names.php
index d4456e24e2..761b7dc9a1 100644
--- a/database/migrations/2017_01_25_063357_fix_utf8_custom_field_column_names.php
+++ b/database/migrations/2017_01_25_063357_fix_utf8_custom_field_column_names.php
@@ -19,6 +19,7 @@ use Illuminate\Database\Schema\Blueprint;
*/
function updateLegacyColumnName($customfield) {
+
$name_to_db_name = CustomField::name_to_db_name($customfield->name);
\Log::debug('Trying to rename '.$name_to_db_name." to ".$customfield->convertUnicodeDbSlug()."...\n");
@@ -48,6 +49,8 @@ class FixUtf8CustomFieldColumnNames extends Migration
*/
public function up()
{
+ $platform = Schema::getConnection()->getDoctrineSchemaManager()->getDatabasePlatform();
+ $platform->registerDoctrineTypeMapping('enum', 'string');
Schema::table('custom_fields', function ($table) {
$table->string('db_column')->nullable();