-
Notifications
You must be signed in to change notification settings - Fork 43
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
More support for ALTER TABLE operations #24
Comments
@svoynow-lz , do you know if Cassandra is currently supporting this operation? I ask you because I remember some incongruencies between Cassandra docs and what is really implemented, so you really have to test the operation to see if it works. |
I believe it supports it in the case(s) where the data types are compatible / convertible. |
Right. So it is useful! I also agree with you second thought... |
What about renaming column? I was checking lib/cassandra_migrations/migration/column_operations.rb and rename_column isn't defined. |
Never mind, just realized this would only work for primary_key names (which is the main purpose of RENAME in CQL) and it would return the "cannot rename non PRIMARY KEY part ...)" QueryError when used with non primary key column keys. That explains why it probably hasn't been implemented. |
i.e. the ability to change the datatype of a row
ALTER TABLE mytable ALTER somecolumn TYPE uuid
Just a matter of adding some methods to ColumnOperations
I'll probably do it and send a PR at some point.
The text was updated successfully, but these errors were encountered: