@@ 7-30 (lines=24) @@ | ||
4 | use Illuminate\Database\Schema\Blueprint; |
|
5 | use Illuminate\Support\Facades\Schema; |
|
6 | ||
7 | class UpdatePermissionsTable extends Migration |
|
8 | { |
|
9 | public function up() |
|
10 | { |
|
11 | if (Schema::hasTable('permissions')) { |
|
12 | Schema::table('permissions', function (Blueprint $table) { |
|
13 | $table->boolean('duck_funk_housekeeping_read'); |
|
14 | $table->boolean('duck_funk_housekeeping_write'); |
|
15 | $table->boolean('duck_funk_housekeeping_approve'); |
|
16 | }); |
|
17 | } |
|
18 | } |
|
19 | ||
20 | public function down() |
|
21 | { |
|
22 | if (Schema::hasTable('permissions')) { |
|
23 | Schema::table('permissions', function (Blueprint $table) { |
|
24 | $table->dropColumn('duck_funk_housekeeping_read'); |
|
25 | $table->dropColumn('duck_funk_housekeeping_write'); |
|
26 | $table->dropColumn('duck_funk_housekeeping_approve'); |
|
27 | }); |
|
28 | } |
|
29 | } |
|
30 | } |
|
31 |
@@ 7-28 (lines=22) @@ | ||
4 | use Illuminate\Database\Schema\Blueprint; |
|
5 | use Illuminate\Support\Facades\Schema; |
|
6 | ||
7 | class UpdateUsersSettingsTable extends Migration |
|
8 | { |
|
9 | public function up() |
|
10 | { |
|
11 | if (Schema::hasTable('users_settings')) { |
|
12 | Schema::table('users_settings', function (Blueprint $table) { |
|
13 | $table->boolean('welcome_flow_enabled')->default(1); |
|
14 | $table->tinyInteger('welcome_flow_step')->default(1); |
|
15 | }); |
|
16 | } |
|
17 | } |
|
18 | ||
19 | public function down() |
|
20 | { |
|
21 | if (Schema::hasTable('users_settings')) { |
|
22 | Schema::table('users_settings', function (Blueprint $table) { |
|
23 | $table->dropColumn('welcome_flow_enabled'); |
|
24 | $table->dropColumn('welcome_flow_step'); |
|
25 | }); |
|
26 | } |
|
27 | } |
|
28 | } |
|
29 |