1
0
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:
Dan Brown
2025-10-19 19:52:15 +01:00
parent 5754acf2fb
commit efff8700d4
7 changed files with 37 additions and 19 deletions

View File

@@ -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
}
/**