Skip to content

A free open source IT asset/license management system

Added `start_date` and `end_date` migration to users table

snipe7353ecd388a5
diff --git a/database/migrations/2022_10_05_163044_add_start_termination_date_to_users.php b/database/migrations/2022_10_05_163044_add_start_termination_date_to_users.php
new file mode 100644
index 0000000000..23074b6eaf
--- /dev/null
+++ b/database/migrations/2022_10_05_163044_add_start_termination_date_to_users.php
@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddStartTerminationDateToUsers extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('users', function (Blueprint $table) {
+ $table->date('start_date')->nullable()->default(null);
+ $table->date('end_date')->nullable()->default(null);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::table('users', function (Blueprint $table) {
+ $table->dropColumn('start_date');
+ $table->dropColumn('end_date');
+ });
+ }
+}