Commit Graph

25 Commits (5ebc1af91e96ca065ea55f20e94de5d874a442c8)

Author SHA1 Message Date
Your Name 5ebc1af91e BATCH 1 1 week ago
Your Name 6496904293 Fix account storage limit not freeing on media deletion (#7169)
users.storage_used only ever grew: uploads incremented it but no deletion
path decremented it, so users hit the account size limit even when their
real media usage was well below it.

- Decrement storage_used in MediaDeletePipeline when media is removed
- Add UserStorageService::increaseStorageUsed / decrementStorageUsed as the
  fast, symmetric hot-path counter updates (floor-based, clamped at zero)
- Refactor the 6 upload call sites to use increaseStorageUsed instead of
  duplicated inline writes (also fixes ceil/floor drift vs the reconciler)
- Add (user_id, size) covering index so per-user SUM(size) is not a full
  table scan (INPLACE/LOCK=NONE, skipped on sqlite)
- Add user:storage:recalculate command to repair affected accounts, with a
  daily --stale=168 scheduled reconciler to correct any drift
- Add regression tests for the pipeline and UserStorageService
2 weeks ago
Your Name 042ab0a6e4 Convert optional() to nullsafe operator
Applies patch 2/21 from pixelfed-staging PR #9: replaces optional($x)->y
with $x?->y across 16 files. Pint-clean.
3 weeks ago
Your Name d456b7b64a Add structured metadata to MediaDeletePipeline skip/failure logs
Replace interpolated log strings with structured context (media/status/profile/
user ids, mime, size, order, paths, hls_path, remote flag, timestamps) so
operators can trace why orphan-purge deletions are skipped or fail.
4 weeks ago
Your Name c0cde2f682 refactor: move 52 legacy models from App\ to App\Models\
Move all Eloquent models from the app/ root directory to app/Models/
for consistency with modern Laravel conventions. The project already had
54 models in App\Models; this migrates the remaining 52 legacy models.

Changes:
- Move 52 model files from app/ to app/Models/
- Update namespace declarations in each model
- Update all ~1000 import references across the codebase
- Add Relation::morphMap() in AppServiceProvider for backward
  compatibility with existing polymorphic database records
- Add missing HasSnowflakePrimary imports for models that relied
  on same-namespace resolution
4 weeks ago
Daniel Supernault 33dce75f2c
Pint app/ 4 weeks ago
Your Name c807a8524c refactor: replace short facade aliases with fully-qualified imports
Convert all 273 short facade alias imports (e.g. 'use Cache;') to their
fully-qualified class names (e.g. 'use Illuminate\Support\Facades\Cache;')
across 193 files.

This resolves 643 PHPStan 'class.notFound' errors caused by the static
analyzer being unable to resolve global aliases, and aligns with modern
Laravel conventions. It also unblocks removing the aliases array from
config/app.php in a future change.

All 107 tests pass.
4 weeks ago
Shlee 8f48722b6b
Update MediaDeletePipeline.php 1 month ago
Shlee 6c5df90468
Update MediaDeletePipeline.php 1 month ago
Daniel Supernault 53742fa699
Lint 9 months ago
Your Name 2d0a575391 MediaPipeline defensive checks 11 months ago
Daniel Supernault 665581d80c
Update cloud storage, use config_cache 3 years ago
Daniel Supernault f9bbb05575
Update MediaDeletePipeline, handle HLS deletion 3 years ago
Daniel Supernault 672cccd433
Add media:fix-nonlocal-driver command. Fixes s3 media created with invalid FILESYSTEM_DRIVER=s3 configuration 4 years ago
Daniel Supernault 257c094911
Update StatusDelete pipeline, dispatch async 4 years ago
Daniel Supernault 04c2b041fc
Update media pipelines 4 years ago
Daniel Supernault aa32eb8780
Update DeletePipeline 4 years ago
Daniel Supernault 1f7f6ca3a3
Update MediaDeletePipeline to handle flysystem v3 4 years ago
Daniel Supernault bb1cccbe03
Update MediaDeletePipeline, fix async media deletion 4 years ago
Daniel Supernault f6d1b0a24b
cs fix 4 years ago
Shlee 485c586ef2
Update MediaDeletePipeline.php 4 years ago
Daniel Supernault ea0fc90c92
Add default licenses and license sync 5 years ago
Daniel Supernault 41792eea56
Update config() to config_cache() 5 years ago
Daniel Supernault 37dbb3de29
Update MediaStorageService, dispatch deletes to MediaDeletePipeline 6 years ago
Daniel Supernault be6d12fcb6
Update MediaPipeline, handle cloud object storage 6 years ago