Skip to content

Commit

Permalink
migration down macro
Browse files Browse the repository at this point in the history
  • Loading branch information
emreakay committed Nov 4, 2023
1 parent f3ab6da commit 6c3af80
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/ArFlowServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ public function boot(): ArFlowServiceProvider
$this->json($stateMetadata)->nullable();
});

Blueprint::macro('arflowDown', function (string $workflow = 'workflow', string $state = 'state', string $stateMetadata = 'state_metadata') {
/**
* @var Blueprint $this
*/
$this->dropColumn($workflow);
$this->dropColumn($state);
$this->dropColumn($stateMetadata);
});

// load packages migrations
$this->loadMigrationsFrom(__DIR__.'/../database/migrations');

Expand Down

0 comments on commit 6c3af80

Please sign in to comment.