Skip to content

0.8.1 - Constraints bug fix

Choose a tag to compare

@ocean ocean released this 18 Dec 00:24
· 95 commits to main since this release

Fixed

  • Constraint Error Handling: Index Name Reconstruction (Issue #34)
  • Improved constraint name extraction to reconstruct full index names from SQLite error messages
  • Now follows Ecto's naming convention: table_column1_column2_index
  • Single-column constraints: "UNIQUE constraint failed: users.email" → "users_email_index" (previously just "email")
  • Multi-column constraints: "UNIQUE constraint failed: users.slug, users.parent_slug" → "users_slug_parent_slug_index"
  • Backtick handling: Properly strips trailing backticks appended by libSQL to error messages
  • Enhanced error messages: Preserves custom index names from enhanced format (index: custom_index_name)
  • NOT NULL constraints: Reconstructs index names following same convention
  • Enables accurate unique_constraint/3 and check_constraint/3 matching with custom index names in Ecto changesets

Full Changelog: 0.8.0...0.8.1