-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
Support 'copy' command.
Actually, cassandra doesn't support rename table name, and to rename a table we need:
- migrate the data to a file or something like this with the command: 'copy';
- drop the table;
- recreate with the new name;
- use copy again to migrate the data from file to the renamed table;
Example:
-- description: recreate foobar table
-- authoredAt: lucasoliveiracampos
-- up:
-- stage: 1
copy foobar to 'foobar_2017_08_19_11_17_00_data.csv';
-- stage: 2
drop table foobar;
-- stage: 3
create table foobar (
foo text,
bar bigint,
primary key ((foo))
);
-- stage: 4
copy foobar from 'foobar_2017_08_19_11_17_00_data.csv';
-- down:
Metadata
Metadata
Assignees
Labels
No labels