mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-04-29 06:09:56 +00:00
ZIP Exports: Changed the instance id mechanism
Adds an instance id via app settings.
This commit is contained in:
parent
edb684c72c
commit
bdca9fc1ce
4 changed files with 38 additions and 8 deletions
database/migrations
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
DB::table('settings')->insert([
|
||||
'setting_key' => 'instance-id',
|
||||
'value' => Str::uuid(),
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
'type' => 'string',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
DB::table('settings')->where('setting_key', '=', 'instance-id')->delete();
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue