mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-10-25 06:37:36 +03:00
DB: Addressed test issues for user ID changes
Reverted change for activities table so that a record is retained of past activity, and added a check where the ID may be displayed to ensure it does not mislead and accidentially reference other, newer users.
This commit is contained in:
@@ -6,7 +6,6 @@ use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
protected static array $toNullify = [
|
||||
'activities' => ['user_id'],
|
||||
'attachments' => ['created_by', 'updated_by'],
|
||||
'comments' => ['created_by', 'updated_by'],
|
||||
'deletions' => ['deleted_by'],
|
||||
@@ -55,9 +54,6 @@ return new class extends Migration {
|
||||
DB::table($tableName)->whereNotIn($columnName, $idSelectQuery)->delete();
|
||||
}
|
||||
}
|
||||
|
||||
// TODO - Ensure each is fully handled in user delete
|
||||
// Start by writing tests for each of these columns
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user