Skip to content

A free open source IT asset/license management system

Change order number to string in components table

sniped7434797ec47
diff --git a/database/migrations/2016_10_19_145520_fix_order_number_in_components_to_string.php b/database/migrations/2016_10_19_145520_fix_order_number_in_components_to_string.php
new file mode 100644
index 0000000000..c08131d922
--- /dev/null
+++ b/database/migrations/2016_10_19_145520_fix_order_number_in_components_to_string.php
@@ -0,0 +1,31 @@
+<?php
+
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class FixOrderNumberInComponentsToString extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('components', function ($table) {
+ $table->string('order_number')->nullable()->default(null)->change();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::table('components', function ($table) {
+ $table->integer('order_number')->nullable()->default(null)->change();
+ });
+ }
+}