Permalink
Browse files

previous bug

  • Loading branch information...
1 parent 4e9a3b4 commit aa7634addb429a619a420dfff2811ccbdebb0965 @christophehurpeau committed Apr 6, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 db/DBSchema.php
View
@@ -1,5 +1,6 @@
<?php
abstract class DBSchema{
+ private $tableExist=true;
protected $schemaProcessing,$modelName,$tableName,$modelInfos,$isEntity,$columns=false;
/** @var DB */
protected $db;
@@ -34,7 +35,7 @@ public function process(){
$db=&$this->db;
if($this->isGenerateSchema() && $this->schemaProcessing->isGenerate()){
- if(!$this->tableExist()){
+ if(!($this->tableExist=$this->tableExist())){
$this->log('Create table');
if($this->shouldApply()){
$this->createTable();
@@ -248,7 +249,8 @@ public function compareForeignKeys(){
public function generatePropDefs(){
- if($this->columns===null) $this->columns=$this->getColumns();
+ if(!$this->tableExist) return;
+ if($this->columns===false) $this->columns=$this->getColumns();
$modelName=&$this->modelName;
$properties=$this->createModelPropDef();

0 comments on commit aa7634a

Please sign in to comment.