Ejemplo n.º 1
0
 /**
  * Console application's method for checking if migrations' table installed
  * @return boolean
  */
 public static function installed()
 {
     if (QueryBuilder::showTables(static::$tableName)->exec()->fetch()) {
         return true;
     }
     return false;
 }
Ejemplo n.º 2
0
 /**
  * Searches and returns Table object
  * @param string $tableName
  * @throws Exception
  * @return Table
  */
 public static function get($tableName)
 {
     if (!QueryBuilder::showTables($tableName)->exec()->fetch()) {
         throw new Exception("table '{$tableName}' is not exist");
     }
     return new static($tableName);
 }