Skip to content

Commit

Permalink
Add cache table
Browse files Browse the repository at this point in the history
  • Loading branch information
christophrumpel committed May 7, 2024
1 parent c584bbb commit e132327
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions database/migrations/2024_05_07_180958_create_cache_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('cache', function (Blueprint $table) {
$table->string('key')->primary();
$table->mediumText('value');
$table->integer('expiration');
});

Schema::create('cache_locks', function (Blueprint $table) {
$table->string('key')->primary();
$table->string('owner');
$table->integer('expiration');
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('cache');
Schema::dropIfExists('cache_locks');
}
};

0 comments on commit e132327

Please sign in to comment.