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 CreateUsersTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('users')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('username', 40)->default('')->unique('username');
|
||||
|
||||
Reference in New Issue
Block a user