Comments (9)
If audit.threshold = 0
, that delete should never be executed
laravel-auditing/src/Drivers/Database.php
Line 25 in 22682dd
unless you have the
auditThreshold
property on that model, on that case, this would be a duplicate of #947laravel-auditing/src/Auditable.php
Lines 616 to 619 in 22682dd
from laravel-auditing.
are you able to try 13.6.6 as well? are you able to share your config file?
from laravel-auditing.
checked 13.6.6 same problem
config file - audit.php is not published (default used)
additionally i see: log created for model in 13.6.5 is deleted for some reason
from laravel-auditing.
As per #947 this behaviour happens when the audit.threshold
value is higher than 0. Is your code definitely not changing that one value at any point even if the config file isn't used? Can you output the value from php artisan tinker
to confirm what it is?
from laravel-auditing.
from laravel-auditing.
found issue in
vendor/owen-it/laravel-auditing/src/Drivers/Database.php
here is db log:
\Illuminate\Support\Facades\DB::enableQueryLog(); $model->audits() ->latest() ->offset($threshold)->limit(PHP_INT_MAX) ->delete() > 0; $queries = \Illuminate\Support\Facades\DB::getQueryLog(); dd($queries);
delete from
auditswhere
audits.
auditable_type= ? and
audits.
auditable_id= ? and
audits.
auditable_idis not null order by
created_at desc limit 9223372036854775807
delete method is ignoring offset method. this is reason why logs are removing("not creating")
from laravel-auditing.
from laravel-auditing.
checked, forgot that in model I set limit for rows 1000000
from laravel-auditing.
Hi, test new changes on #948
from laravel-auditing.
Related Issues (20)
- Implement support for Laravel 11.x. HOT 1
- Column with type `point` throws error HOT 1
- SoftDelete behaviour config option true/false HOT 5
- Laravel 11 HOT 1
- Error when implementing transformAudit HOT 2
- UUID user_type and user_id store error HOT 3
- Empty array values when auditing relations HOT 3
- Unknown column 'auditEvents' in 'field list'
- AuditingEventServiceProvider disables Laravel's Event Auto-Discovery HOT 2
- Laravel Audit breaks Events Auto Discovery HOT 1
- Laravel's auto event discovery not working HOT 1
- Possible bug in auditSync: Unexpected old/new values HOT 4
- Accessing static trait property OwenIt\Auditing\Audit::$auditingDisabled is deprecated HOT 2
- Auditing for each relationship being saved more than once in multiple relationship auditing with auditSync
- Prepared statement contains too many placeholders HOT 10
- Audited logs deleted on fresh install with threshold set to > 0 HOT 8
- https://laravel-auditing.com/ is not accessible HOT 4
- Incorrect user associated with audit when changing users dynamically HOT 3
- Database allows null in old/new_values, but Audit::resolveData errors out if they are HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-auditing.