create_samples_table.php - opensource-workshop/connect-cms GitHub Wiki

ァンプル・テーブル

<?php

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

/**
 * ァンプル・テーブル
 *
 * @author ζ°ΈεŽŸγ€€η―€ <[email protected]>
 * @copyright OpenSource-WorkShop Co.,Ltd. All Rights Reserved
 * @category ァンプル・プラグむン
 * @package Controller
 */
class CreateSamplesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('samples', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('bucket_id');
            $table->string('bucket_name', 255)->comment('バケツ名');
            //$table->timestamps();
            $table->integer('created_id')->nullable();
            $table->string('created_name', 255)->nullable();
            $table->timestamp('created_at')->nullable();
            $table->integer('updated_id')->nullable();
            $table->string('updated_name', 255)->nullable();
            $table->timestamp('updated_at')->nullable();
            $table->integer('deleted_id')->nullable();
            $table->string('deleted_name', 255)->nullable();
            $table->timestamp('deleted_at')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('samples');
    }
}