:::

5-4 /database/migrations/2018_08_10_145117_add_tests_cols.php

<?php

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

class AddTestsCols extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('tests', function (Blueprint $table) {
            $table->unsignedTinyInteger('grade');
            $table->unsignedTinyInteger('class');
            $table->unsignedTinyInteger('num');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('tests', function (Blueprint $table) {
            $table->dropColumn(['grade', 'class', 'num']);
        });
    }
}

 


:::

書籍目錄

展開 | 闔起

快速登入


http%3A%2F%2Fcampus-xoops.tn.edu.tw%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbdsn%3D1333%26tbsn%3D41

計數器

今天: 623623623
昨天: 3068306830683068
總計: 8077128807712880771288077128807712880771288077128