Skip to content

Commit

Permalink
Updated migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
PrasadChinwal committed Nov 14, 2023
1 parent e9c4192 commit cbc710e
Showing 1 changed file with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,20 @@
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->string('netid')->after('id')->unique();
$table->string('first_name')->after('name');
$table->string('last_name')->after('first_name');
$table->string('uin', 9)->unique()->after('last_name');
if(!Schema::hasColumn('users', 'netid')) {
$table->string('netid')->after('id')->unique();
}

if(!Schema::hasColumn('users', 'first_name')) {
$table->string('first_name')->after('name');
}
if(!Schema::hasColumn('users', 'last_name')) {
$table->string('last_name')->after('first_name');
}
if(!Schema::hasColumn('users', 'uin')) {
$table->string('uin', 9)->after('netid')->unique();
}

$table->longText('access_token')->nullable()->after('password');
$table->longText('id_token')->nullable()->after('access_token');
$table->longText('refresh_token')->nullable()->after('id_token');
Expand Down

0 comments on commit cbc710e

Please sign in to comment.