| @@ -1,9 +1,11 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | namespace Give\API\Endpoints\Migrations; |
| 4 | 4 | |
| 5 | +use Give\Framework\Migrations\Contracts\BatchMigration; | |
| 5 | 6 | use Give\Framework\Migrations\Contracts\Migration; |
| 7 | +use Give\Framework\Migrations\Contracts\ReversibleMigration; | |
| 6 | 8 | use Give\Framework\Migrations\MigrationsRegister; |
| 7 | 9 | use Give\MigrationLog\Helpers\MigrationHelper; |
| 8 | 10 | use Give\MigrationLog\MigrationLogRepository; |
| 9 | 11 | use Give\MigrationLog\MigrationLogStatus; |
| @@ -160,8 +162,10 @@ | ||
| 160 | 162 | 'last_run' => $migration->getLastRunDate(), |
| 161 | 163 | 'run_order' => $this->migrationHelper->getRunOrderForMigration($migration->getId()), |
| 162 | 164 | 'source' => $migrationClass::source(), |
| 163 | 165 | 'title' => $migrationClass::title(), |
| 166 | + 'isBatchMigration' => is_subclass_of($migrationClass, BatchMigration::class), | |
| 167 | + 'isReversible' => is_subclass_of($migrationClass, ReversibleMigration::class), | |
| 164 | 168 | ]; |
| 165 | 169 | } |
| 166 | 170 | |
| 167 | 171 | // Check for pending migrations |
| @@ -174,8 +178,9 @@ | ||
| 174 | 178 | 'last_run' => '', |
| 175 | 179 | 'run_order' => $this->migrationHelper->getRunOrderForMigration($migration::id()), |
| 176 | 180 | 'source' => $migration::source(), |
| 177 | 181 | 'title' => $migration::title(), |
| 182 | + 'isBatchMigration' => is_subclass_of($migration, BatchMigration::class) | |
| 178 | 183 | ]; |
| 179 | 184 | } |
| 180 | 185 | |
| 181 | 186 | // Sort migrations |