Skip to content

Commit

Permalink
add support database cache
Browse files Browse the repository at this point in the history
  • Loading branch information
rez1dent3 committed Dec 13, 2023
1 parent 3fd65e4 commit 23fd722
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/phpunits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
matrix:
php-versions: [8.1, 8.2, 8.3]
databases: [testing, pgsql, mysql, mariadb]
caches: [array, redis, memcached]
caches: [array, redis, memcached, database]
locks: [redis, memcached]

services:
Expand Down
35 changes: 35 additions & 0 deletions tests/migrations/2023_12_13_190445_create_cache_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

use Illuminate\Database\Migrations\Migration;

Check failure on line 3 in tests/migrations/2023_12_13_190445_create_cache_table.php

View workflow job for this annotation

GitHub Actions / phpstan

File is missing a "declare(strict_types=1)" declaration.
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 23fd722

Please sign in to comment.