Skip to content

A free open source IT asset/license management system

Fixes #2774 - change order_number to string in components and consumables

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