0
0
Fork 0
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:
Dan Brown 2024-11-27 16:30:19 +00:00
parent edb684c72c
commit bdca9fc1ce
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
4 changed files with 38 additions and 8 deletions

View file

@ -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();
}
};