Skip to content

Fixes gh-1650 Add columns to existing tables in SQL #1961

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

Merged
merged 3 commits into from
Mar 19, 2021

Conversation

pgulutzan
Copy link
Contributor

Warning: not just an .rst change, also an .svg and .spec change.

the column name must be unique within the table.
Example with a STRING column that must start with X: |br|
``ALTER TABLE t1 ADD COLUMN s4 STRING CHECK (s4 LIKE 'X%');`` |br|
ALTER TABLE ... ADD COLUMN support was added in version :doc:`2.7.1 </release/2.7.1>`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for mentioning the version!

@github-actions github-actions bot temporarily deployed to release March 19, 2021 01:57 Inactive
@NickVolynkin
Copy link
Contributor

NickVolynkin commented Mar 19, 2021

@pgulutzan Peter, thanks!

There's new deployment magic that I'd like to tell you about. Now we can build the changes in a pull request and preview them on the test website.

To deploy a pull request, one should add a build-branch label to the pull request, like I've done here. Then GitHub will build and deploy the current commit, and then do the same for each new commit in this PR.

While the build is in progress, pull request will have this banner:

изображение

We're looking at the "Deploy-branch" job. When it's ready, banner will change to this:

изображение

Now one can click the Show environments button and then open the link to the deployment:

изображение

I've added a link back from the release notes and formatted the code example a little. This commit was already built and deployed, you can have a look.

If you're okay with my additions, please merge the pull request.

@github-actions github-actions bot temporarily deployed to release March 19, 2021 04:18 Inactive
@veod32 veod32 linked an issue Mar 19, 2021 that may be closed by this pull request
@veod32
Copy link
Collaborator

veod32 commented Mar 19, 2021

I added another link back from the release notes page. Now we are good to go with merging.

@pgulutzan pgulutzan merged commit a6b0eb9 into latest Mar 19, 2021
@pgulutzan pgulutzan deleted the pgulutzan-gh-1650 branch March 19, 2021 14:39
@pgulutzan
Copy link
Contributor Author

@NickVolynkin: When you say I should add a "build-branch" label, I guess you mean that, for example on this pull request, I should click on "Labels" and then click the branch number, which is 2.7.1 (somebody clicked "deploy-branch" which I guess is not what I should do), okay. I have explained why I believe that adding "code-block:: sql" is generally a bad idea but won't argue about this case. On prior occasions I used the command line to merge, but this time I just clicked the merge button on this site. It seems that I was supposed to put something in the release notes pointing to ALTER TABLE, okay.

@pgulutzan
Copy link
Contributor Author

@NickVolynkin: I overlooked two things:

  1. In the list after the word "Syntax:" I should have added ALTER TABLE table-name ADD COLUMN column-name column-definition;".
  2. In the Limitations I should have removed "It is not possible to add or drop a column. However, there is a plan to make it possible to add a column for an empty table (Issue#3075)." Thanks to @veod32 for noticing this.

If you do not object, I will simply fix those things and push.

@NickVolynkin
Copy link
Contributor

@pgulutzan please do!

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.

[2pt] Add columns to existing tables in SQL
3 participants