【发布时间】:2018-07-03 06:01:27
【问题描述】:
在如下数据库表中;
public function up()
{
Schema::create('current_adresses', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
$table->string('current_name',50)->nullable();
$table->string('current_surname',50)->nullable();
$table->string('telephone',25)->nullable();
$table->timestamps();
});
}
我想做如下;
public function up()
{
Schema::create('current_adresses', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
$table->string('current_name',50)->nullable();
$table->string('current_surname',50)->nullable();
$table->string('gsm',25)->nullable();
$table->string('telephone',25)->nullable();
$table->timestamps();
});
}
如何在不刷新的情况下更新新列(gsm 列)(php artisan migrate:refresh)
【问题讨论】:
-
在控制器中使用模型
-
我不明白 :(
-
换行还是换列?
标签: php laravel-5 database-migration