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