Kaynağa Gözat

Update 'src/Schema/Db/Table.php'

ahwelp 6 yıl önce
ebeveyn
işleme
ad50a598af
1 değiştirilmiş dosya ile 5 ekleme ve 3 silme
  1. 5 3
      src/Schema/Db/Table.php

+ 5 - 3
src/Schema/Db/Table.php

@@ -626,9 +626,11 @@ class Table
      */
     public function create()
     {
-        $this->getAdapter()->createTable($this);
-        $this->saveData();
-        $this->reset(); // reset pending changes
+      	if (!$this->getAdapter()->hasTable($this->name)) {
+        	$this->getAdapter()->createTable($this);
+        	$this->saveData();
+        	$this->reset(); // reset pending changes
+        }
     }
 
     /**