mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:57:22 +08:00
migrations check if table exists
This commit is contained in:
@@ -13,6 +13,9 @@ class CreateCommentsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('comments')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('comments', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->unsignedMediumInteger('user')->default(0)->index('user');
|
||||
|
||||
Reference in New Issue
Block a user