mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
migrations check if table exists
This commit is contained in:
@@ -13,6 +13,9 @@ class CreateSchoolsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if (Schema::hasTable('schools')) {
|
||||
return;
|
||||
}
|
||||
Schema::create('schools', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
$table->string('name', 50)->nullable();
|
||||
|
||||
Reference in New Issue
Block a user