Storage
WorkflowStorage is the durable contract. The in-memory adapter is for tests. SupabaseWorkflowStorage is the PostgreSQL adapter.
The graph adapter stored definitions, instances, user tasks, and events in product tables such as workflow_instances. The durable adapter installs a dedicated schema:
workflow_versionsworkflow_runsworkflow_eventsworkflow_commandsworkflow_user_tasksworkflow_signals
dart
final storage = SupabaseWorkflowStorage(
client: serviceRoleClient,
schema: WorkflowRuntimeInstaller.defaultSchema,
);Install once per physical database or hard isolation boundary:
sh
dart run vyuh_workflow_storage_supabase:install \
--output supabase/migrations/install_workflow_runtime.sqlThe installer rejects an incompatible existing table shape. Products share the kernel through tenant_id and application_id.
The generated migration grants service_role only and enables RLS. Never place a service-role key in a Flutter client. The command table is the durable queue. An external broker, if introduced, must be fed through a transactional outbox.