Skip to content

Commit

Permalink
Merge pull request #38 from deanblackborough/main
Browse files Browse the repository at this point in the history
Cache
  • Loading branch information
deanblackborough authored Aug 10, 2022
2 parents 5a7f8a1 + 6c7ecad commit 5205f21
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions database/migrations/2022_08_10_191948_create_cache_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

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

return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
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.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('cache');
Schema::dropIfExists('cache_locks');
}
};

0 comments on commit 5205f21

Please sign in to comment.