【发布时间】:2020-12-14 06:42:19
【问题描述】:
我不知道如何解决这个问题
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateDomainsTable extends Migration
{
/**
* Run the migrations.
*
* @return voidzz
*/
public function up()
{
Schema::create('domains', function (Blueprint $table) {
$table->id();
$table->integer('user_id')->nullable();
$table->string('domain')->collate('utf8_bin')->nullable();
$table->string('google_domain')->collate('utf8_bin')->nullable();
$table->string('location')->collate('utf8_bin')->nullable();
$table->string('device')->collate('utf8_bin')->nullable();
// $table->string('Hl')->nullable();
// $table->string('Gl')->nullable();
$table->string('hl')->collate('utf8_bin')->nullable();
$table->string('gl')->collate('utf8_bin')->nullable();
$table->integer('domain_status')->default('active')->nullable();
$table->integer('update_frequency')->nullable();
$table->timestampsTz();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('domains');
}
}
【问题讨论】:
-
请分享create_domains_table迁移代码
标签: database laravel migration database-migration laravel-7