Files
opensem/database/migrations/2013_04_09_062329_create_revisions_table.php
Ludovic CANDELLIER 39c80ce6d1 add shipping rules
2023-07-16 14:45:42 +02:00

38 lines
888 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
class CreateRevisionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('revisions', function ($table) {
$table->bigIncrements('id');
$table->string('revisionable_type');
$table->unsignedBigInteger('revisionable_id');
$table->unsignedBigInteger('user_id')->nullable();
$table->string('key');
$table->text('old_value')->nullable();
$table->text('new_value')->nullable();
$table->timestamps();
$table->index(['revisionable_id', 'revisionable_type']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('revisions');
}
}