-
Notifications
You must be signed in to change notification settings - Fork 42
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
Support for DDL ALTER statement #215
Comments
Are we going to support DDL alter soon ? |
@rmorais01 thanks for opening this issue & explicit examples, required changes will be in this PR #225 |
@abhishek0102 @rmorais01 all changes released in version 0.32.0, tests added here - https://github.com/xnuinside/simple-ddl-parser/blob/main/tests/test_alter_statements.py#L1778. If will be needed something else - feel free to open new issues & thanks one more time! |
@xnuinside thanks alot. |
Is your feature request related to a problem? Please describe.
A very useful addition to the simple-ddl-parser would be the ability to parse and process the SQL ALTER command for ADD/DROP/RENAME column, MODIFY DATATYPE and MODIFY CONSTRAINT. Currently there is a very limited support for only processing ALTER statements with FOREIGN key.
Describe the solution you'd like
The solution must be able to parse the SQL ALTER command and apply the alterations to the Table created using the CREATE command in the same file.
Describe alternatives you've considered
NA
Additional context
Here are some examples for the ALTER command
ALTER TABLE - ADD Column
ALTER TABLE table_name ADD column_name datatype;
ALTER TABLE - DROP COLUMN
ALTER TABLE table_name DROP COLUMN column_name;
ALTER TABLE - RENAME COLUMN
ALTER TABLE table_name RENAME COLUMN old_name to new_name;
ALTER TABLE - ALTER/MODIFY DATATYPE
ALTER TABLE table_name ALTER COLUMN column_name datatype; (SQL Server)
ALTER TABLE table_name MODIFY COLUMN column_name datatype; (My SQL / Oracle (prior version 10G)
ALTER TABLE table_name MODIFY column_name datatype; (Oracle 10G and later:)
The text was updated successfully, but these errors were encountered: