Skip to content

Commit 9f51bdc

Browse files
authored
Merge pull request #60 from binafy/fix/breaking
Fix breaking for `user_guard` column
2 parents 22cb76c + d6e0670 commit 9f51bdc

4 files changed

+44
-3
lines changed

database/migrations/2023_07_22_230401_create_visits_monitoring_table.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ public function up(): void
2121
$table->string('platform');
2222
$table->string('device');
2323
$table->string('ip');
24-
$table->string('user_guard')->nullable();
2524
$table->text('page');
2625

2726
$table->timestamps();

database/migrations/2023_07_23_145723_create_actions_monitoring_table.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ public function up(): void
2424
$table->string('platform');
2525
$table->string('device');
2626
$table->string('ip');
27-
$table->string('user_guard')->nullable();
2827
$table->text('page');
2928

3029
$table->timestamps();

database/migrations/2023_07_25_132642_create_authentications_monitoring_table.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ public function up(): void
4141
$table->string('platform');
4242
$table->string('device');
4343
$table->string('ip');
44-
$table->string('user_guard')->nullable();
4544
$table->text('page');
4645

4746
$table->timestamps();
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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+
/**
10+
* Run the migrations.
11+
*/
12+
public function up(): void
13+
{
14+
Schema::table(config('user-monitoring.visit_monitoring.table'), function (Blueprint $table) {
15+
$table->string('user_guard')->nullable();
16+
});
17+
18+
Schema::table(config('user-monitoring.action_monitoring.table'), function (Blueprint $table) {
19+
$table->string('user_guard')->nullable();
20+
});
21+
22+
Schema::table(config('user-monitoring.authentication_monitoring.table'), function (Blueprint $table) {
23+
$table->string('user_guard')->nullable();
24+
});
25+
}
26+
27+
/**
28+
* Reverse the migrations.
29+
*/
30+
public function down(): void
31+
{
32+
Schema::table(config('user-monitoring.visit_monitoring.table'), function (Blueprint $table) {
33+
$table->dropColumn('user_guard');
34+
});
35+
36+
Schema::table(config('user-monitoring.action_monitoring.table'), function (Blueprint $table) {
37+
$table->dropColumn('user_guard');
38+
});
39+
40+
Schema::table(config('user-monitoring.authentication_monitoring.table'), function (Blueprint $table) {
41+
$table->dropColumn('user_guard');
42+
});
43+
}
44+
};

0 commit comments

Comments
 (0)