Skip to content
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

issues-229 add column if not exists #278

Merged

Conversation

ikrivosheev
Copy link
Member

PR Info

Adds

Add support for query like:

ALTER TABLE name
    ADD COLUMN IF NOT EXISTS column_name data_type

for PostgreSQL and for MySQL. For SQLLite this is ignored

@ikrivosheev ikrivosheev changed the title Feature/issues 229 add column if not exists issues-229 add column if not exists Mar 22, 2022
@tyt2y3
Copy link
Member

tyt2y3 commented Mar 24, 2022

I don't think this works for MySQL, may be just MariaDB?

Copy link
Member

@tyt2y3 tyt2y3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the addition of this API. But a bool does not seem forword looking, we might want to create a new type AddColumnOption (or some reasonable name)?

@ikrivosheev
Copy link
Member Author

Thank you for the review.

I don't think this works for MySQL, may be just MariaDB?

Yes, you are right! Fix

I like the addition of this API. But a bool does not seem forword looking, we might want to create a new type AddColumnOption (or some reasonable name)?

Done.

@ikrivosheev
Copy link
Member Author

@tyt2y3 I have done. Can you review it please?)

@ikrivosheev ikrivosheev requested a review from tyt2y3 March 30, 2022 09:27
@tyt2y3 tyt2y3 merged commit 822ebe1 into SeaQL:master Apr 3, 2022
@ikrivosheev ikrivosheev deleted the feature/issues-229_add_column_if_not_exists branch April 3, 2022 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support ifnotexist(column) add column
2 participants