Development

Changeset 11272

You must first sign up to be able to contribute.

Changeset 11272

Show
Ignore:
Timestamp:
09/01/08 09:00:41 (5 years ago)
Author:
Kris.Wallsmith
Message:

sfPropelPlugin [migration]: Added convenience create/add and drop methods to column and index abstraction classes that accept a string table name parameter.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfPropelPlugin/branches/migration/lib/propel/migration/model/sfPropelColumn.class.php

    r11269 r11272  
    246246  } 
    247247 
     248  public function addTo($tableName, PropelPDO $con = null) 
     249  { 
     250    return $this->create(sfPropelTable::name($tableName), $con); 
     251  } 
     252 
     253  public function dropFrom($tableName, PropelPDO $con = null) 
     254  { 
     255    return $this->drop(sfPropelTable::name($tableName), $con); 
     256  } 
     257 
    248258  public function asPropel(sfPropelTable $table) 
    249259  { 
     
    325335    } 
    326336 
    327     throw new RuntimeException(sprintf('The method %s does not exist.', __METHOD__)); 
     337    throw new RuntimeException(sprintf('The method %s::%s() does not exist.', get_class($this), $method)); 
    328338  } 
    329339} 
  • plugins/sfPropelPlugin/branches/migration/lib/propel/migration/model/sfPropelIndex.class.php

    r11269 r11272  
    9595  } 
    9696 
     97  public function createOn($tableName, PropelPDO $con = null) 
     98  { 
     99    return $this->create(sfPropelTable::name($tableName), $con); 
     100  } 
     101 
     102  public function dropFrom($tableName, PropelPDO $con = null) 
     103  { 
     104    return $this->drop(sfPropelTable::name($tableName), $con); 
     105  } 
     106 
    97107  public function asPropel(sfPropelTable $table) 
    98108  {