From b0b87db86d7e57cfbf5c05d4cd2a3f63fa61c99c Mon Sep 17 00:00:00 2001 From: ludo Date: Wed, 7 Feb 2024 21:54:58 +0100 Subject: [PATCH] add shop cart storage --- ...2024_02_07_210334_create_health_tables.php | 36 +++++++++++++++++++ ...01_29_218135_create_shop_baskets_table.php | 4 +-- 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 database/migrations/2024_02_07_210334_create_health_tables.php diff --git a/database/migrations/2024_02_07_210334_create_health_tables.php b/database/migrations/2024_02_07_210334_create_health_tables.php new file mode 100644 index 00000000..fed7adf6 --- /dev/null +++ b/database/migrations/2024_02_07_210334_create_health_tables.php @@ -0,0 +1,36 @@ +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'); + }); + } +}; diff --git a/database/migrations/shop/2024_01_29_218135_create_shop_baskets_table.php b/database/migrations/shop/2024_01_29_218135_create_shop_baskets_table.php index 20f22a4b..cfc7a621 100644 --- a/database/migrations/shop/2024_01_29_218135_create_shop_baskets_table.php +++ b/database/migrations/shop/2024_01_29_218135_create_shop_baskets_table.php @@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; -class CreateCartStorageTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -31,4 +31,4 @@ class CreateCartStorageTable extends Migration { Schema::dropIfExists('shop_baskets'); } -} \ No newline at end of file +}; \ No newline at end of file