]> BookStack Code Mirror - bookstack/commit
DB: Updated handling of deleted user ID handling in DB
authorDan Brown <redacted>
Sun, 19 Oct 2025 18:10:15 +0000 (19:10 +0100)
committerDan Brown <redacted>
Sun, 19 Oct 2025 18:10:15 +0000 (19:10 +0100)
commit5754acf2fb9fcb60bb2ffd95bab3b0bcb1b162fd
treea00d88b3452fda5ab373d5b9d2ace48f8eaec5e7
parent4c7d6420ee6ab08c5d1df5221962d84abcb89b21
DB: Updated handling of deleted user ID handling in DB

Updated uses of user ID to nullify on delete.
Added testing to cover deletion of user relations.
Added model factories to support changes and potential other tests.
Cleans existing ID references in the DB via migration.
20 files changed:
app/Access/Mfa/MfaValue.php
app/Access/SocialAccount.php
app/Activity/Models/Activity.php
app/Activity/Models/Favourite.php
app/Activity/Models/Watch.php
app/Entities/Models/Deletion.php
app/Entities/Models/PageRevision.php
app/Users/Models/User.php
app/Users/UserRepo.php
database/factories/Access/Mfa/MfaValueFactory.php [new file with mode: 0644]
database/factories/Access/SocialAccountFactory.php [new file with mode: 0644]
database/factories/Activity/Models/ActivityFactory.php [new file with mode: 0644]
database/factories/Activity/Models/FavouriteFactory.php [new file with mode: 0644]
database/factories/Activity/Models/WatchFactory.php [new file with mode: 0644]
database/factories/Entities/Models/DeletionFactory.php [new file with mode: 0644]
database/factories/Entities/Models/PageFactory.php
database/factories/Entities/Models/PageRevisionFactory.php [new file with mode: 0644]
database/migrations/2025_09_15_134751_update_entity_relation_columns.php
database/migrations/2025_10_18_163331_clean_user_id_references.php [new file with mode: 0644]
tests/User/UserManagementTest.php