Selaa lähdekoodia

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

ahwelp 6 vuotta sitten
vanhempi
sitoutus
ad50a598af
1 muutettua tiedostoa jossa 5 lisäystä ja 3 poistoa
  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
+        }
     }
 
     /**