Skip to content

Commit 504aa3e

Browse files
committed
Fixed version 0.19.4 update check
1 parent 40867c2 commit 504aa3e

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/Http/Middleware/Settings.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,15 @@ public function handle($request, Closure $next)
174174
]);
175175
}
176176

177+
if((int) Str::replace('.', '', config('laravel-crm.version')) >= 194) {
178+
Setting::firstOrCreate([
179+
'global' => 1,
180+
'name' => 'db_update_0194',
181+
], [
182+
'value' => 0,
183+
]);
184+
}
185+
177186
$installIdSetting = Setting::where([
178187
'name' => 'install_id',
179188
])->first();

src/Http/Middleware/SystemCheck.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ public function handle($request, Closure $next)
6464
}
6565
}
6666

67+
if($setting = \VentureDrake\LaravelCrm\Models\Setting::where('name', 'db_update_0194')->first()) {
68+
if($setting->value == 0) {
69+
$dbUpdateRequired = true;
70+
}
71+
}
72+
6773
if($dbUpdateRequired) {
6874
flash('Your Laravel CRM software version requires some database updates to function correctly. Please <a href="https://github.com/venturedrake/laravel-crm#upgrading-from--02">update database</a>')->info()->important();
6975
}

0 commit comments

Comments
 (0)