<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('fat_logs', function (Blueprint $table) {
            $table->tinyInteger('fat_device')->default(0)->comment('体脂秤 0:天诚 1:云康宝')->after('init_data');
            $table->string('device_model')->nullable()->comment('体脂秤型号')->after('fat_device');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('fat_logs', function (Blueprint $table) {
            $table->dropColumn('fat_device');
            $table->dropColumn('device_model');
        });
    }
};
