Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- class CreateHistoryTable extends Migration
- {
- /**
- * Run the migrations.
- */
- public function up()
- {
- Schema::create('history', function (Blueprint $table) {
- $table->bigIncrements('id');
- $table->unsignedInteger('historable_id');
- $table->string('historable_type');
- $table->unsignedBigInteger('user_id')->nullable();
- $table->string('title')->nullable();
- $table->string('locale')->nullable();
- $table->string('historable_table');
- $table->string('action');
- $table->json('old');
- $table->json('new');
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- */
- public function down()
- {
- Schema::drop('history');
- }
- }
RAW Paste Data