PHP Classes

File: database/migrations/0001_01_01_000001_create_cache_table.php

Recommend this page to a friend!
  Classes of Thierry Feuzeu   Jaxon DB Admin   database/migrations/0001_01_01_000001_create_cache_table.php   Download  
File: database/migrations/0001_01_01_000001_create_cache_table.php
Role: Class source
Content typex: text/plain
Description: Class source
Class: Jaxon DB Admin
Web application to manage SQL of databases
Author: By
Last change: Update of database/migrations/0001_01_01_000001_create_cache_table.php
Date: 2 months ago
Size: 849 bytes
 

Contents

Class file image Download
<?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');
    }
};