-
Notifications
You must be signed in to change notification settings - Fork 156
feat: implement ADD COLUMN operation support #2107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…alidators - Moved the isTablePath function to a new pathValidators.ts file for better organization. - Updated operationsSchema.ts to utilize the new isTablePath validator. - Enhanced the addTableOperation validation by using valibot for schema parsing. - Added a createPathValidator utility to facilitate the creation of path validation functions. This refactor improves code readability and maintainability by separating concerns and leveraging runtime type validation.
- Delete operationsSchema.ts and split into domain-based files - Create schema/table.ts for table-related operations - Move path validators to separate reusable utilities - Update imports to use new schema structure - Maintain existing functionality while improving organization 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Add column.ts for column-related operations - Implement AddColumnOperation schema and type guard - Add generateAddColumnStatement utility function - Support ADD COLUMN DDL generation in operationDeparser - Add comprehensive tests for column operations - Use v.safeParse for consistent validation approach 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
PR Reviewer Guide 🔍(Review updated until commit a8dba58)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to a8dba58
Previous suggestionsSuggestions up to commit a8dba58
|
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
#2094 is merged, remove the WIP.Issue
Why is this change needed?
This change implements ADD COLUMN operation support for the database schema operation system. This extends the existing table creation functionality to also support adding individual columns to existing tables, which is essential for complete DDL generation capabilities.
What would you like reviewers to focus on?
Testing Verification
What was done
🤖 Generated by PR Agent at a8dba58
• Implement ADD COLUMN operation support for DDL generation
• Refactor operation schemas into domain-based structure
• Add comprehensive tests for column operations
• Enhance path validation utilities
Detailed Changes
1 files
Add comprehensive tests for ADD COLUMN operations
6 files
Implement ADD COLUMN operation deparser logic
Add generateAddColumnStatement utility function
Create reusable path validator utility
Implement column operation schema and type guards
Refactor to use domain-based operation schemas
Extract table operations into separate module
2 files
Update import path for operation schema
Update export path for operations schema
Additional Notes
This PR builds upon the domain-based refactoring from the previous commit and follows the same patterns established for table operations. The implementation uses
v.safeParse
for consistent validation and maintains the same error handling approach as existing operations.