2022_07_07_142650_alter_immerse3.php 1.42 KB
<?php

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

class AlterImmerse3 extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('immerse', function (Blueprint $table) {
            $table->string('weather')->after('content')->default('')->comment('天气');
            $table->string('huangli')->after('weather')->default('')->comment('黄历');
            $table->string('longitude')->after('huangli')->default('')->comment('经度');
            $table->string('latitude')->after('longitude')->default('')->comment('纬度');
            $table->string('location')->after('latitude')->default('')->comment('所在地');
        });

        Schema::table('admin_make_video', function (Blueprint $table) {
            $table->string('longitude')->after('huangli')->default('')->comment('经度');
            $table->string('latitude')->after('longitude')->default('')->comment('纬度');
            $table->string('location')->after('latitude')->default('')->comment('所在地');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropColumns('immerse', ['longitude', 'latitude', 'location']);
        Schema::dropColumns('admin_make_video', ['longitude', 'latitude', 'location']);
    }
}