Skip to content

A free open source IT asset/license management system

Add new fields to custom fields table

sniped970daa666c0
diff --git a/database/migrations/2016_08_23_143353_add_new_fields_to_custom_fields.php b/database/migrations/2016_08_23_143353_add_new_fields_to_custom_fields.php
new file mode 100644
index 0000000000..ae32779a19
--- /dev/null
+++ b/database/migrations/2016_08_23_143353_add_new_fields_to_custom_fields.php
@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddNewFieldsToCustomFields extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('custom_fields', function (Blueprint $table) {
+ //
+ $table->string('field_values')->nullable()->default(null);
+ $table->boolean('field_encrypted')->default(0);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::table('custom_fields', function (Blueprint $table) {
+ //
+ $table->dropColumn('field_values', 'field_encrypted');
+ });
+ }
+}