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

Add/alter columns should be separate statements #159

Merged
merged 5 commits into from
Dec 14, 2023

Conversation

matthewjumpsoffbuildings
Copy link
Contributor

In Google Cloud Spanner, you cannot add or alter multiple columns in a single DML statement. Instead, you need to execute separate ALTER TABLE statements for each column you want to add or modify.

The current implementation make a single statement

alter table `table` add column `column_one` string(max), add column `column_two` string(max);

This fix makes the correct statements

alter table `table` add column `column_one` string(max);
alter table `table` add column `column_two` string(max);

@taka-oyama
Copy link
Collaborator

Please add a summary to CHANGELOG. Thanks.

CHANGELOG.md Outdated Show resolved Hide resolved
@taka-oyama taka-oyama merged commit 0d438b3 into colopl:master Dec 14, 2023
1 check passed
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.

None yet

2 participants