Skip to content

Commit 0c9f5ea

Browse files
committed
Add workflows table drop on rollback migration
1 parent 038e391 commit 0c9f5ea

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

database/migrations/create_workflows_table.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,9 @@ public function up()
1919
$table->timestamps();
2020
});
2121
}
22+
23+
public function down()
24+
{
25+
Schema::dropIfExists('workflows');
26+
}
2227
};

src/DatabaseLoader.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public function getWorkflowStateTransitionTableName(): string
5050

5151
public function load(string $workflowName): array
5252
{
53-
return [];
53+
$workflow = Workflow::with(['states', 'transitions'])->where('name', $workflowName)->first();
54+
$config[$workflow->name] = [];
5455
}
5556
}

src/Models/Workflow.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class Workflow extends Model
1414

1515
protected $fillable = [
1616
'name',
17+
'marking_store_attribute',
1718
'type',
1819
'description',
1920
'supports',

0 commit comments

Comments
 (0)