• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

miaoxing / services / 5076847193

pending completion
5076847193

push

github

twinh
feat(services): `MigrationRollback` 增加支持 `only` 选项

0 of 6 new or added lines in 1 file covered. (0.0%)

61 of 622 relevant lines covered (9.81%)

5.7 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Command/MigrationRollback.php
1
<?php
2

3
namespace Miaoxing\Services\Command;
4

5
use Miaoxing\Plugin\Command\BaseCommand;
6
use Symfony\Component\Console\Input\InputArgument;
7
use Symfony\Component\Console\Input\InputOption;
8
use Wei\Migration;
9

10
class MigrationRollback extends BaseCommand
11
{
12
    /**
13
     * Execute the console command.
14
     *
15
     * @return void
16
     */
17
    public function handle()
18
    {
NEW
19
        Migration::setOutput($this->output)->rollback([
×
NEW
20
            'target' => $this->getArgument('target'),
×
NEW
21
            'only' => $this->getOption('only'),
×
NEW
22
        ]);
×
23
    }
24

25
    protected function configure()
26
    {
27
        $this->setDescription('Rollback the last migration or to the specified target migration ID')
×
NEW
28
            ->addArgument('target', InputArgument::OPTIONAL, 'Stop until the specified target migration ID')
×
NEW
29
            ->addOption('only', 'o', InputOption::VALUE_NONE, 'Whether only rollback the specified migration ID');
×
30
    }
31
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc