urlsnail/database/migrations/2024_05_26_131804_add_cache...

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');
}
};