From 08a9fc0ad9f58d3c44b7dc88ba7dcfbb50bfc7d0 Mon Sep 17 00:00:00 2001 From: "T9-CNUD11\\NASPC" Date: Wed, 15 Jul 2026 15:00:29 +0700 Subject: [PATCH] feat: add missing profile and status columns to users table --- ...ng_columns_to_users_table--table=users.php | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 database/migrations/2026_07_15_150007_add_missing_columns_to_users_table--table=users.php diff --git a/database/migrations/2026_07_15_150007_add_missing_columns_to_users_table--table=users.php b/database/migrations/2026_07_15_150007_add_missing_columns_to_users_table--table=users.php new file mode 100644 index 00000000..ea718d42 --- /dev/null +++ b/database/migrations/2026_07_15_150007_add_missing_columns_to_users_table--table=users.php @@ -0,0 +1,31 @@ +use Illuminate\Database\Migrations\Migration; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; + +return new class extends Migration +{ + public function up(): void + { + Schema::table('users', function (Blueprint $table) { + $table->string('phone')->nullable()->after('name'); + $table->string('user_email')->nullable()->after('phone'); + $table->integer('birth_year')->nullable()->after('user_email'); + $table->string('address')->nullable()->after('birth_year'); + $table->tinyInteger('known_sis')->nullable()->after('address'); + $table->string('job')->nullable()->after('known_sis'); + $table->tinyInteger('status')->default(1)->after('job'); + $table->tinyInteger('spined')->default(0)->after('status'); + $table->string('confirmation_string')->nullable()->after('spined'); + }); + } + + public function down(): void + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn([ + 'phone', 'user_email', 'birth_year', 'address', + 'known_sis', 'job', 'status', 'spined', 'confirmation_string' + ]); + }); + } +};