Skip to content

Allow SQL backends to use a custom migrations table - #1

Merged
rmorlok merged 1 commit into
mainfrom
codex/migrations-table-option
Jun 6, 2026
Merged

rmorlok merged 1 commit into
mainfrom
codex/migrations-table-option

Conversation

@rmorlok

@rmorlok rmorlok commented Jun 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

Applications embedding go-workflows within their primary application may want to share the main application database with go-workflows. If they use go-migrate, today they will collide with the schema migrations table. Provide an option in go-workflows to specify which table should be used to avoid the conflict.

  • Add WithMigrationsTable for the PostgreSQL and SQLite backends.
  • Pass the configured table name through to golang-migrate so only migration bookkeeping changes; workflow state tables are unchanged.
  • Cover the shared-database case where an embedding application already owns the default schema_migrations table.
  • Document the new backend options.

Tests

  • go build -v ./...
  • go test -short -timeout 120s -race -count 1 -v ./...
  • make lint
  • go test -timeout 180s -race -count 1 -v ./backend/postgres
  • go test -timeout 180s -race -count 1 -v ./backend/redis
  • go test -timeout 180s -race -count 1 -v ./backend/sqlite
  • go test -timeout 300s -race -count 1 -v ./...

Refs rmorlok/authproxy#539

@rmorlok
rmorlok merged commit c8be9ef into main Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant