rinvex/cortex-attributes

View on GitHub
database/migrations/2020_01_01_000001_alter_attributes_table_add_auditable_columns.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

declare(strict_types=1);

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

class AlterAttributesTableAddAuditableColumns extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table(config('rinvex.attributes.tables.attributes'), function (Blueprint $table) {
            $table->auditable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table(config('rinvex.attributes.tables.attributes'), function (Blueprint $table) {
            $table->dropAuditable();
        });
    }
}