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