cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitry Lazurkin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-14706) Support "IF EXISTS/IF NOT EXISTS" for all clauses of "ALTER TABLE"
Date Wed, 03 Oct 2018 23:48:00 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-14706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16637631#comment-16637631
] 

Dmitry Lazurkin commented on CASSANDRA-14706:
---------------------------------------------

RDBMS have DDL-transactions. So this is not so crucial for it. But C* migrations aren't so
comfortable without this feature. If you have up-migration with many statements then you can't
restart up-migration after error in middle and you can't start down-migration. You need manual
revert of all statement before error.

> Support "IF EXISTS/IF NOT EXISTS" for all clauses of "ALTER TABLE"
> ------------------------------------------------------------------
>
>                 Key: CASSANDRA-14706
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14706
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Dmitry Lazurkin
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Like so:
> {noformat}
> ALTER TABLE <table> ALTER <column> TYPE <newtype>;
> ALTER TABLE [ IF EXISTS ] <table> ADD [ IF NOT EXISTS ] <coumn> <newtype>;
> ALTER TABLE [ IF EXISTS ] <table> ADD [ IF NOT EXISTS ] (<column> <newtype>,<column1>
<newtype1>..... <column n> <newtype n>);
> ALTER TABLE [ IF EXISTS ] <table> DROP [ IF EXISTS ] <column>;
> ALTER TABLE [ IF EXISTS ] <table> DROP [ IF EXISTS ] ( <column>,<column1>.....<column
n>);
> ALTER TABLE [ IF EXISTS ] <table> RENAME [ IF EXISTS ] <column> TO <column>;
> ALTER TABLE [ IF EXISTS ] <table> WITH <property> = <value>;
> {noformat}
> I think common IF EXISTS/IF NOT EXISTS clause for ADD/DROP/RENAME better than clause
for each column.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message