Skip to content

# breaking-change

1 post with the tag “breaking-change”

## pgflow 0.6.0: Worker Deprecation and Context Changes

Aug 6, 2025 - 1 min read
Wojciech Majewski (@jumski)
Creator and Maintainer
Featured

pgflow 0.6.0 introduces worker deprecation for deployments without version overlap and simplifies the context object with breaking changes.

## Worker Deprecation

Section titled “Worker Deprecation”

Deploy new workers without version overlap. Deprecated workers stop accepting new tasks while finishing current work.

    -- Deprecate old workers before starting new onesUPDATE pgflow.workersSET deprecated_at = NOW()WHERE function_name = 'your-worker-name'  AND deprecated_at IS NULL;

Workers detect deprecation within 5 seconds via heartbeat and gracefully stop polling. The deployment guide has been simplified with a single safe deployment sequence.

## Breaking Context Changes

Section titled “Breaking Context Changes”

The context object is now cleaner and more consistent:

Breaking Changes

- Removed: `context.anonSupabase`
- Renamed: `context.serviceSupabase` → `context.supabase`

Before (0.5.x):

    async function handler(input, context) {  const { data } = await context.serviceSupabase    .from('users')    .select('*');}

After (0.6.0):

    async function handler(input, context) {  const { data } = await context.supabase    .from('users')    .select('*');}

## Migration

Section titled “Migration”

1. Update context usage: `context.serviceSupabase` → `context.supabase`
2. Remove any `context.anonSupabase` usage
3. Use worker deprecation for smooth deployments

The service role client is now the primary Supabase interface, simplifying database operations in handler functions.