Skip to content

Job based for pruning database tables with large dataset

License

Notifications You must be signed in to change notification settings

trybunce/database-pruning

Repository files navigation

Prune Large Database Tables Data

DatabasePruningFactory::forQuery(DB::table('table')->where('column', $value))
          ->chunk(700)
          ->displayName($name = 'DeleteTransactions')
          ->usingConnection($connection) // specify sql connection to perform the deletion. 
          ->getBatch()
          ->name($name)
          ->onConnection('your job connection')
          ->onQueue('your job queue')
          ->dispatch();

About

Job based for pruning database tables with large dataset

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages