Преглед на файлове

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

ahwelp преди 6 години
родител
ревизия
ad50a598af
променени са 1 файла, в които са добавени 5 реда и са изтрити 3 реда
  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
+        }
     }
 
     /**