Skip to content

Allow adding autoincrement column via "ALTER VSCHEMA..." statement#5094

Merged
sougou merged 1 commit intovitessio:masterfrom
kalfonso:kalfonso.190814-alter-vschema-add-autoinc
Aug 16, 2019
Merged

Allow adding autoincrement column via "ALTER VSCHEMA..." statement#5094
sougou merged 1 commit intovitessio:masterfrom
kalfonso:kalfonso.190814-alter-vschema-add-autoinc

Conversation

@kalfonso
Copy link
Copy Markdown
Contributor

Signed-off-by: Karel Alfonso Sague kalfonso@squareup.com

@kalfonso kalfonso requested a review from sougou as a code owner August 14, 2019 07:25
Signed-off-by: Karel Alfonso Sague <kalfonso@squareup.com>
@kalfonso kalfonso force-pushed the kalfonso.190814-alter-vschema-add-autoinc branch from 10dbb6b to c031bd6 Compare August 14, 2019 10:19
}, {
input: "alter vschema add sequence a_seq",
}, {
input: "alter vschema on a add auto_increment id using a_seq",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I like this syntax!

{
$$ = &DDL{Action: AddSequenceStr, Table: $5}
}
| ALTER VSCHEMA ON table_name ADD AUTO_INCREMENT sql_id USING table_name
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Does “table_name” support keyspace prefix? Generally the sequence is in a different keyspace.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes, it accepts a qualifier which would be the keyspace in this case

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.

3 participants