Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-14706

Support "IF EXISTS/IF NOT EXISTS" for all clauses of "ALTER TABLE"

    XMLWordPrintableJSON

Details

    Description

      Like so:

      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>;
      

      I think common IF EXISTS/IF NOT EXISTS clause for ADD/DROP/RENAME better than clause for each column.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dmitry.lazurkin Dmitry Lazurkin
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h