feat: add missing profile and status columns to users table
This commit is contained in:
@@ -9,15 +9,33 @@ return new class extends Migration
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('users', 'phone')) {
|
||||
$table->string('phone')->nullable()->after('name');
|
||||
}
|
||||
if (!Schema::hasColumn('users', 'user_email')) {
|
||||
$table->string('user_email')->nullable()->after('phone');
|
||||
}
|
||||
if (!Schema::hasColumn('users', 'birth_year')) {
|
||||
$table->integer('birth_year')->nullable()->after('user_email');
|
||||
}
|
||||
if (!Schema::hasColumn('users', 'address')) {
|
||||
$table->string('address')->nullable()->after('birth_year');
|
||||
}
|
||||
if (!Schema::hasColumn('users', 'known_sis')) {
|
||||
$table->tinyInteger('known_sis')->nullable()->after('address');
|
||||
}
|
||||
if (!Schema::hasColumn('users', 'job')) {
|
||||
$table->string('job')->nullable()->after('known_sis');
|
||||
}
|
||||
if (!Schema::hasColumn('users', 'status')) {
|
||||
$table->tinyInteger('status')->default(1)->after('job');
|
||||
}
|
||||
if (!Schema::hasColumn('users', 'spined')) {
|
||||
$table->tinyInteger('spined')->default(0)->after('status');
|
||||
}
|
||||
if (!Schema::hasColumn('users', 'confirmation_string')) {
|
||||
$table->string('confirmation_string')->nullable()->after('spined');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user