Skip to content

Commit 1f2df93

Browse files
authored
Merge pull request #7872 from ProcessMaker/feature/FOUR-20688
FOUR-20688: Create a migration to add a new column in the table users
2 parents f728483 + 691bb3f commit 1f2df93

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

ProcessMaker/Models/User.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ class User extends Authenticatable implements HasMedia
8585
* @OA\Property(property="manager_id", type="string", format="id"),
8686
* @OA\Property(property="meta", type="object", additionalProperties=true),
8787
* @OA\Property(property="force_change_password", type="boolean"),
88+
* @OA\Property(property="email_task_notification", type="boolean"),
8889
* ),
8990
* @OA\Schema(
9091
* schema="users",
@@ -128,6 +129,7 @@ class User extends Authenticatable implements HasMedia
128129
'password_changed_at',
129130
'connected_accounts',
130131
'preferences_2fa',
132+
'email_task_notification',
131133
];
132134

133135
protected $appends = [
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
6+
7+
return new class extends Migration {
8+
/**
9+
* Run the migrations.
10+
*
11+
* @return void
12+
*/
13+
public function up()
14+
{
15+
Schema::table('users', function (Blueprint $table) {
16+
$table->boolean('email_task_notification')->default(1);
17+
});
18+
}
19+
20+
/**
21+
* Reverse the migrations.
22+
*
23+
* @return void
24+
*/
25+
public function down()
26+
{
27+
Schema::table('users', function (Blueprint $table) {
28+
$table->dropColumn('email_task_notification');
29+
});
30+
}
31+
};

0 commit comments

Comments
 (0)