Skip to main content
Troubleshoot State-Based Workflow (SDL) specific validation errors.
SDL is currently supported for PostgreSQL databases only. Validation rules enforce strict conventions to ensure maintainable schema definitions.

Missing Schema Qualification

Error:
Cause: SDL requires all objects to have schema prefix. Solution:
Apply to all objects:
  • Tables: CREATE TABLE public.users
  • Indexes: CREATE INDEX idx_name ON public.users(name)
  • Views: CREATE VIEW public.active_users AS ...
  • Functions: CREATE FUNCTION public.get_user() ...

Column-Level Constraint

Error:
Cause: SDL requires constraints at table level (except NOT NULL, DEFAULT, GENERATED). Solution:
Allowed at column level:

Unnamed Constraint

Error:
Solution:
Naming conventions:
  • Primary keys: {table}_pkey
  • Unique constraints: {table}_{column}_key
  • Foreign keys: fk_{table}_{referenced_table}
  • Check constraints: check_{description}

Foreign Key Type Mismatch

Error:
Cause: Column types don’t match between foreign key and referenced column. Solution:

Foreign Key Missing Schema

Error:
Solution:

CHECK Constraint References Other Table

Error:
Cause: CHECK constraints can only reference columns in the same table. Solution:

Migration Generation Fails

Error:
Causes:
  1. Duplicate constraint names across tables
  2. Duplicate index names
  3. Conflicting object names
Solution: Ensure all object names are unique:

Next Steps

SDL Develop Guide

Learn SDL syntax requirements

SDL Limitations

Understand SDL constraints

CI/CD Issues

Troubleshoot CI/CD problems