Skip to content

A free open source IT asset/license management system

Create 2023_08_13_172600_add_email_to_companies.php

Robert-Azelis1e43d88e06f4
diff --git a/database/migrations/2023_08_13_172600_add_email_to_companies.php b/database/migrations/2023_08_13_172600_add_email_to_companies.php
new file mode 100644
index 0000000000..a1369d9ade
--- /dev/null
+++ b/database/migrations/2023_08_13_172600_add_email_to_companies.php
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddEmailToCompanies extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('companies', function (Blueprint $table) {
+ $table->string('email', 150)->after('fax')->nullable()->default(null);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::table('companies', function (Blueprint $table) {
+ $table->dropColumn('email');
+ });
+ }
+}