Skip to content

feat: add support for db enum check#277

Open
niazkhansap wants to merge 1 commit intomainfrom
task/db-enum-check-support
Open

feat: add support for db enum check#277
niazkhansap wants to merge 1 commit intomainfrom
task/db-enum-check-support

Conversation

@niazkhansap
Copy link
Copy Markdown
Contributor

@niazkhansap niazkhansap commented Apr 30, 2026

Summary by CodeRabbit

  • Chores

    • Added database validation constraints for enumerated types to ensure data integrity across the system.
    • Enhanced error handling with specific error types for invalid enum values and unsupported data types.
  • Tests

    • Added comprehensive test coverage for enum validation and database integration operations.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b4994a3a-1f2d-4104-a837-e8eabffbf763

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

This change adds database integration support for enum types across the cmkapi and workflow packages. It introduces Valid() validation methods, implements driver.Valuer and sql.Scanner interfaces for KeyState, SystemStatus, State, ActionType, and ArtifactType enum types, and defines corresponding sentinel errors for validation failures. Comprehensive test suites verify the validation and serialization behavior for both packages. Additionally, a SQL migration introduces CHECK constraints at the database level to enforce allowed enum values for related columns in the workflows, keys, and systems tables.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@niazkhansap niazkhansap force-pushed the task/db-enum-check-support branch from 4e7335b to 771a786 Compare April 30, 2026 15:51
@niazkhansap niazkhansap force-pushed the task/db-enum-check-support branch from 771a786 to 9d21cc0 Compare April 30, 2026 16:06
@niazkhansap
Copy link
Copy Markdown
Contributor Author

@coderabbitai summary

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

✅ Actions performed

Summary regeneration triggered.

@niazkhansap niazkhansap marked this pull request as ready for review April 30, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant