mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
force migration
added maintenance mode
This commit is contained in:
@@ -212,7 +212,7 @@ Follow this steps:
|
||||
- Restore your `.env` config file on your server.
|
||||
|
||||
## Update from 1.7.8 to 1.7.9
|
||||
After uploaded new files, log in as admin to the app and go to `your-domain.com/upgrade-database`. This will upgrade your database on the background.
|
||||
After uploaded new files, log in as admin to the app and go to `your-domain.com/service/upgrade-database`. This will upgrade your database on the background.
|
||||
|
||||
After that, **update path to your project in command below** and add the following **Cron** entry to your server:
|
||||
```
|
||||
|
||||
@@ -125,6 +125,28 @@ class UpgradeAppController extends Controller
|
||||
return response('Done', 200);
|
||||
}
|
||||
|
||||
/**
|
||||
* Start maintenance mode
|
||||
*/
|
||||
public function up() {
|
||||
$command = Artisan::call('up');
|
||||
|
||||
if ($command === 0) {
|
||||
echo 'System is in production mode';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* End maintenance mode
|
||||
*/
|
||||
public function down() {
|
||||
$command = Artisan::call('down');
|
||||
|
||||
if ($command === 0) {
|
||||
echo 'System is in maintenance mode';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Upgrade database
|
||||
*/
|
||||
@@ -137,7 +159,9 @@ class UpgradeAppController extends Controller
|
||||
*/
|
||||
if (! Schema::hasColumn('shares', 'expire_in')) {
|
||||
|
||||
$command = Artisan::call('migrate');
|
||||
$command = Artisan::call('migrate', [
|
||||
'--force' => true
|
||||
]);
|
||||
|
||||
if ($command === 0) {
|
||||
echo 'Operation was successful.';
|
||||
|
||||
@@ -12,6 +12,8 @@ class CheckForMaintenanceMode extends Middleware
|
||||
* @var array
|
||||
*/
|
||||
protected $except = [
|
||||
//
|
||||
'/service/upgrade-database',
|
||||
'/service/down',
|
||||
'/service/up',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -38,8 +38,10 @@ Route::group(['middleware' => ['auth:api', 'auth.master', 'scope:master']], func
|
||||
});
|
||||
|
||||
// Admin system tools
|
||||
Route::group(['middleware' => ['auth:api', 'auth.master', 'auth.admin', 'scope:master']], function () {
|
||||
Route::group(['middleware' => ['auth:api', 'auth.master', 'auth.admin', 'scope:master'], 'prefix' => 'service'], function () {
|
||||
Route::get('/upgrade-database', 'General\UpgradeAppController@upgrade_database');
|
||||
Route::get('/down', 'General\UpgradeAppController@down');
|
||||
Route::get('/up', 'General\UpgradeAppController@up');
|
||||
});
|
||||
|
||||
// Get og site for web crawlers
|
||||
|
||||
Reference in New Issue
Block a user