35 lines
751 B
PHP
35 lines
751 B
PHP
|
<?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 = Schema::connection($this->getConnection());
|
||
|
|
||
|
$schema->create(
|
||
|
'cache', function (Blueprint $table) {
|
||
|
$table->string('key');
|
||
|
$table->string('value');
|
||
|
$table->bigInteger('expiration');
|
||
|
}
|
||
|
);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Reverse the migrations.
|
||
|
*/
|
||
|
public function down(): void
|
||
|
{
|
||
|
$schema = Schema::connection($this->getConnection());
|
||
|
|
||
|
$schema->dropIfExists('cache');
|
||
|
}
|
||
|
};
|