Skip to content

Commit f84a835

Browse files
Merge branch 'feature/console-command' of github.com:WatheqAlshowaiter/backup-tables into feature/console-command
2 parents ff8dfee + 1d4f323 commit f84a835

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Commands/BackupTableCommand.php

+4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
class BackupTableCommand extends Command
99
{
1010
const SUCCESS = 0;
11+
1112
const FAILURE = 1;
13+
1214
protected $signature = 'backup:tables {targets* : The table names or model classes to backup (space-separated)}';
1315

1416
protected $description = 'Backup a specific database table/s based on provided table names or model classes';
@@ -22,12 +24,14 @@ public function handle()
2224

2325
if (! $result) {
2426
$this->error('Failed to backup table.');
27+
2528
return self::FAILURE;
2629
}
2730

2831
return self::SUCCESS;
2932
} catch (\Exception $e) {
3033
$this->error("Error backing up table: {$e->getMessage()}");
34+
3135
return self::FAILURE;
3236
}
3337
}

0 commit comments

Comments
 (0)