Skip to content

Commit 9a6b572

Browse files
authored
Add AsCommant attribute to all console commands (#15)
1 parent befb835 commit 9a6b572

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/ConsoleCommand/ClickhouseMigrateCommand.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,16 @@
1313

1414
namespace Cog\Laravel\Clickhouse\ConsoleCommand;
1515

16+
use Cog\Laravel\Clickhouse\Migration\Migrator;
1617
use Illuminate\Console\Command;
1718
use Illuminate\Console\ConfirmableTrait;
18-
use Cog\Laravel\Clickhouse\Migration\Migrator;
1919
use Illuminate\Contracts\Config\Repository as AppConfigRepositoryInterface;
20+
use Symfony\Component\Console\Attribute\AsCommand;
2021

22+
#[AsCommand(
23+
name: 'clickhouse:migrate',
24+
description: 'Run the ClickHouse database migrations',
25+
)]
2126
final class ClickhouseMigrateCommand extends Command
2227
{
2328
use ConfirmableTrait;

src/ConsoleCommand/MakeClickhouseMigrationCommand.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222
use Symfony\Component\Console\Input\InputArgument;
2323
use Symfony\Component\Console\Input\InputOption;
2424

25-
#[AsCommand(name: 'make:clickhouse-migration')]
25+
#[AsCommand(
26+
name: 'make:clickhouse-migration',
27+
description: 'Create a new ClickHouse migration file',
28+
)]
2629
final class MakeClickhouseMigrationCommand extends Command
2730
{
2831
private MigrationCreator $creator;

0 commit comments

Comments
 (0)