Skip to content

A free open source IT asset/license management system

Possible fix for #6710 - explicitly make auto_increment_prefix nullable (#6716)

snipe14eb6b387b82
diff --git a/database/migrations/2014_11_20_224421_add_prefix_to_settings.php b/database/migrations/2014_11_20_224421_add_prefix_to_settings.php
index dff67400b2..e325b3c55e 100644
--- a/database/migrations/2014_11_20_224421_add_prefix_to_settings.php
+++ b/database/migrations/2014_11_20_224421_add_prefix_to_settings.php
@@ -15,7 +15,7 @@ class AddPrefixToSettings extends Migration {
//
Schema::table('settings', function(Blueprint $table) {
- $table->string('auto_increment_prefix')->default(0);
+ $table->string('auto_increment_prefix')->nullable()->default(NULL);
});
}
diff --git a/database/migrations/2019_02_14_154310_change_auto_increment_prefix_to_nullable.php b/database/migrations/2019_02_14_154310_change_auto_increment_prefix_to_nullable.php
new file mode 100644
index 0000000000..a76b0ec655
--- /dev/null
+++ b/database/migrations/2019_02_14_154310_change_auto_increment_prefix_to_nullable.php
@@ -0,0 +1,30 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class ChangeAutoIncrementPrefixToNullable extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('settings', function (Blueprint $table) {
+ $table->boolean('auto_increment_prefix')->nullable()->default(null)->change();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ //
+ }
+}