supportsMigrations() 공개 메소드

Does this adapter support migrations? Backend specific, as the abstract adapter always returns +false+.
public supportsMigrations ( ) : boolean
리턴 boolean
예제 #1
0
파일: Migrator.php 프로젝트: horde/horde
 /**
  * Constructor.
  *
  * @param Horde_Db_Adapter $connection  A DB connection object.
  * @param Horde_Log_Logger $logger      A logger object.
  * @param array $options                Additional options for the migrator:
  *                                      - migrationsPath: directory with the
  *                                        migration files.
  *                                      - schemaTableName: table for storing
  *                                        the schema version.
  *
  * @throws Horde_Db_Migration_Exception
  */
 public function __construct(Horde_Db_Adapter $connection, Horde_Log_Logger $logger = null, array $options = array())
 {
     if (!$connection->supportsMigrations()) {
         throw new Horde_Db_Migration_Exception('This database does not yet support migrations');
     }
     $this->_connection = $connection;
     $this->_logger = $logger ? $logger : new Horde_Support_Stub();
     $this->_inflector = new Horde_Support_Inflector();
     if (isset($options['migrationsPath'])) {
         $this->_migrationsPath = $options['migrationsPath'];
     }
     if (isset($options['schemaTableName'])) {
         $this->_schemaTableName = $options['schemaTableName'];
     }
     $this->_initializeSchemaInformation();
 }
예제 #2
0
파일: SplitRead.php 프로젝트: horde/horde
 /**
  * Does this adapter support migrations?
  *
  * @return boolean
  */
 public function supportsMigrations()
 {
     return $this->_write->supportsMigrations();
 }