:::

17-2 異動資料表

  1. 建立異動資料表用的migration
    php artisan make:migration add_tests_cols --table=tests
  2.  編輯\專案\database\migrations\2018_08_10_001435_add_tests_cols.php
    public function up()
    {
        Schema::table('tests', function (Blueprint $table) {
            $table->unsignedTinyInteger('grade');
            $table->unsignedTinyInteger('class');
            $table->unsignedTinyInteger('num');
        });
    }

    以及

    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%3Ftbsn%3D37%26tbdsn%3D1328

計數器

今天: 1495149514951495
昨天: 1416141614161416
總計: 7340142734014273401427340142734014273401427340142