-
Notifications
You must be signed in to change notification settings - Fork 185
feat: implement REMOVE COLUMN operation support #2109
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
Conversation
- Add RemoveColumnOperation schema and type guard to column.ts - Implement generateRemoveColumnStatement utility function - Support DROP COLUMN DDL generation in operationDeparser - Add comprehensive tests for remove column operations - Update existing operations to handle column removal functionality 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
|
Updates to Preview Branch (support-remove-column-operation) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
hoshinotsuyoshi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This PR depends on #2108. Once #2108 is merged, this PR will be ready for review and the WIP prefix will be removed.Issue
Why is this change needed?
This change adds support for the
removeoperation on columns, allowing users to generateALTER TABLE DROP COLUMNDDL statements through the operation system.What would you like reviewers to focus on?
column.tsgenerateRemoveColumnStatementfunctionTesting Verification
ALTER TABLE {tableName} DROP COLUMN {columnName};statementspnpm fmt,pnpm lint, andpnpm testall passWhat was done
🤖 Generated by PR Agent at df53d71
• Add support for REMOVE COLUMN operations in database schema system
• Implement DDL generation for ALTER TABLE DROP COLUMN statements
• Add comprehensive test coverage for column removal functionality
• Integrate remove column operation with existing deparser system
Detailed Changes
operationDeparser.test.ts
Add tests for remove column operationfrontend/packages/db-structure/src/deparser/postgresql/operationDeparser.test.ts
• Add test case for DROP COLUMN statement generation from remove
operation
• Verify correct DDL output for column removal operations
operationDeparser.ts
Integrate remove column operation in deparserfrontend/packages/db-structure/src/deparser/postgresql/operationDeparser.ts
• Import RemoveColumnOperation type and type guard function
• Add
generateRemoveColumnFromOperation function for DDL generation
•
Integrate remove column operation handling in main deparser logic
utils.ts
Add utility for DROP COLUMN statement generationfrontend/packages/db-structure/src/deparser/postgresql/utils.ts
• Add generateRemoveColumnStatement utility function
• Generate ALTER
TABLE DROP COLUMN DDL statements
column.ts
Define remove column operation schemafrontend/packages/db-structure/src/operation/schema/column.ts
• Define RemoveColumnOperation schema with validation
• Add
isRemoveColumnOperation type guard function
• Export remove column
operation in columnOperations array
Additional Notes
This implementation follows the established operation support pattern and maintains consistency with existing column operations.
🤖 Generated with Claude Code