@@ 516-524 (lines=9) @@ | ||
513 | * |
|
514 | * @return Version[] |
|
515 | */ |
|
516 | public function getMigratedVersions() |
|
517 | { |
|
518 | $this->connect(); |
|
519 | $this->createMigrationTable(); |
|
520 | ||
521 | $ret = $this->connection->fetchAll("SELECT " . $this->migrationsColumnName . " FROM " . $this->migrationsTableName); |
|
522 | ||
523 | return array_map('current', $ret); |
|
524 | } |
|
525 | ||
526 | /** |
|
527 | * Returns an array of available migration version numbers. |
|
@@ 692-700 (lines=9) @@ | ||
689 | * |
|
690 | * @return integer |
|
691 | */ |
|
692 | public function getNumberOfExecutedMigrations() |
|
693 | { |
|
694 | $this->connect(); |
|
695 | $this->createMigrationTable(); |
|
696 | ||
697 | $result = $this->connection->fetchColumn("SELECT COUNT(" . $this->migrationsColumnName . ") FROM " . $this->migrationsTableName); |
|
698 | ||
699 | return $result !== false ? $result : 0; |
|
700 | } |
|
701 | ||
702 | /** |
|
703 | * Returns the total number of available migration versions |