@@ -126,6 +126,9 @@ |
||
| 126 | 126 | |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | + /** |
|
| 130 | + * @param string $version |
|
| 131 | + */ |
|
| 129 | 132 | private function generateMigration(MigrationConfiguration $configuration, $version, $kind) { |
| 130 | 133 | $placeHolders = [ |
| 131 | 134 | '<namespace>', |
@@ -22,7 +22,6 @@ |
||
| 22 | 22 | namespace OC\Core\Command\Db\Migrations; |
| 23 | 23 | |
| 24 | 24 | |
| 25 | -use OC\DB\MigrationConfiguration; |
|
| 26 | 25 | use OC\DB\MigrationService; |
| 27 | 26 | use OCP\IConfig; |
| 28 | 27 | use OCP\IDBConnection; |
@@ -89,6 +89,9 @@ |
||
| 89 | 89 | return $infos; |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | + /** |
|
| 93 | + * @param string $alias |
|
| 94 | + */ |
|
| 92 | 95 | private function getFormattedVersionAlias(MigrationConfiguration $configuration, $alias) { |
| 93 | 96 | $migration = $configuration->getMigration($alias); |
| 94 | 97 | //No version found |
@@ -21,7 +21,6 @@ |
||
| 21 | 21 | |
| 22 | 22 | namespace OC\Core\Command\Db\Migrations; |
| 23 | 23 | |
| 24 | -use OC\DB\MigrationConfiguration; |
|
| 25 | 24 | use OC\DB\MigrationService; |
| 26 | 25 | use OCP\IConfig; |
| 27 | 26 | use OCP\IDBConnection; |
@@ -69,7 +69,6 @@ |
||
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | /** |
| 72 | - * @param int $max |
|
| 73 | 72 | * @since 9.1.0 |
| 74 | 73 | */ |
| 75 | 74 | public function finishProgress() { |
@@ -199,6 +199,9 @@ discard block |
||
| 199 | 199 | return $migrations; |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | + /** |
|
| 203 | + * @param string $to |
|
| 204 | + */ |
|
| 202 | 205 | private function getMigrationsToExecute($to) { |
| 203 | 206 | $knownMigrations = $this->getMigratedVersions(); |
| 204 | 207 | $availableMigrations = $this->getAvailableVersions(); |
@@ -216,6 +219,9 @@ discard block |
||
| 216 | 219 | return $toBeExecuted; |
| 217 | 220 | } |
| 218 | 221 | |
| 222 | + /** |
|
| 223 | + * @param string[] $knownMigrations |
|
| 224 | + */ |
|
| 219 | 225 | private function shallBeExecuted($m, $knownMigrations) { |
| 220 | 226 | if (in_array($m, $knownMigrations)) { |
| 221 | 227 | return false; |
@@ -224,6 +230,9 @@ discard block |
||
| 224 | 230 | return true; |
| 225 | 231 | } |
| 226 | 232 | |
| 233 | + /** |
|
| 234 | + * @param string $version |
|
| 235 | + */ |
|
| 227 | 236 | private function markAsExecuted($version) { |
| 228 | 237 | $this->connection->insertIfNotExist('*PREFIX*migrations', [ |
| 229 | 238 | 'app' => $this->appName, |
@@ -304,7 +313,7 @@ discard block |
||
| 304 | 313 | } |
| 305 | 314 | |
| 306 | 315 | /** |
| 307 | - * @return mixed|string |
|
| 316 | + * @return string|false |
|
| 308 | 317 | */ |
| 309 | 318 | private function getCurrentVersion() { |
| 310 | 319 | $m = $this->getMigratedVersions(); |
@@ -314,6 +323,9 @@ discard block |
||
| 314 | 323 | return end(array_values($m)); |
| 315 | 324 | } |
| 316 | 325 | |
| 326 | + /** |
|
| 327 | + * @param string $version |
|
| 328 | + */ |
|
| 317 | 329 | private function getClass($version) { |
| 318 | 330 | if (empty($this->migrations)) { |
| 319 | 331 | $this->migrations = $this->findMigrations(); |