migrations check if table exists

This commit is contained in:
xiaomlove
2021-06-09 15:11:02 +08:00
parent 5c4c2ccf8f
commit c771ff9ef1
96 changed files with 339 additions and 17 deletions
@@ -13,6 +13,9 @@ class CreateResreqTable extends Migration
*/
public function up()
{
if (Schema::hasTable('resreq')) {
return;
}
Schema::create('resreq', function (Blueprint $table) {
$table->integer('id', true);
$table->integer('reqid')->default(0)->index('reqid');