Skip to content

A free open source IT asset/license management system

Hotfix for dumb enum issue

snipe0a506120b772
diff --git a/database/migrations/2016_08_30_084634_make_purchase_cost_nullable.php b/database/migrations/2016_08_30_084634_make_purchase_cost_nullable.php
index c4eef30aa8..241fa07269 100644
--- a/database/migrations/2016_08_30_084634_make_purchase_cost_nullable.php
+++ b/database/migrations/2016_08_30_084634_make_purchase_cost_nullable.php
@@ -12,6 +12,10 @@ class MakePurchaseCostNullable extends Migration
*/
public function up()
{
+
+ $platform = Schema::getConnection()->getDoctrineSchemaManager()->getDatabasePlatform();
+ $platform->registerDoctrineTypeMapping('enum', 'string');
+
Schema::table('assets', function ($table) {
$table->decimal('purchase_cost',8,2)->nullable()->default(null)->change();
});