Skip to content

support copy command  #44

Description

@lucasRogerioOliveira

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:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions