add shop cart storage
This commit is contained in:
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Spatie\Health\Models\HealthCheckResultHistoryItem;
|
||||||
|
use Spatie\Health\ResultStores\EloquentHealthResultStore;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
$connection = (new HealthCheckResultHistoryItem())->getConnectionName();
|
||||||
|
$tableName = EloquentHealthResultStore::getHistoryItemInstance()->getTable();
|
||||||
|
|
||||||
|
Schema::connection($connection)->create($tableName, function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
|
||||||
|
$table->string('check_name');
|
||||||
|
$table->string('check_label');
|
||||||
|
$table->string('status');
|
||||||
|
$table->text('notification_message')->nullable();
|
||||||
|
$table->string('short_summary')->nullable();
|
||||||
|
$table->json('meta');
|
||||||
|
$table->timestamp('ended_at');
|
||||||
|
$table->uuid('batch');
|
||||||
|
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::connection($connection)->table($tableName, function(Blueprint $table) {
|
||||||
|
$table->index('created_at');
|
||||||
|
$table->index('batch');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
class CreateCartStorageTable extends Migration
|
return new class extends Migration
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
@@ -31,4 +31,4 @@ class CreateCartStorageTable extends Migration
|
|||||||
{
|
{
|
||||||
Schema::dropIfExists('shop_baskets');
|
Schema::dropIfExists('shop_baskets');
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
Reference in New Issue
Block a user