Skip to content
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

No way to use it for automation #23

Open
CyborTronik opened this issue Jun 28, 2016 · 2 comments
Open

No way to use it for automation #23

CyborTronik opened this issue Jun 28, 2016 · 2 comments

Comments

@CyborTronik
Copy link

Nice project.
But there is a issue for using it for automation.
It requires to have keyspace created before migration, but how to create keyspace itself if I'm interested just for some quick check?

And for production yes, keyspace must be created by devops.

It's not actual issue for this project, but would be nice to have such feature for wide usage.

@hhandoko
Copy link

hhandoko commented Sep 8, 2016

@CyborTronik you can create the keyspace by executing ad-hoc CQL. Assuming you have configured a Session beforehand: session.execute(statement).

Example (for Cassandra v3+), find existing keyspaces and create statements:

SELECT *
FROM system_schema.keyspaces
WHERE keyspace_name = {{your_keyspace}}
CREATE KEYSPACE {{your_keyspace}}
WITH REPLICATION = {
  'class' : 'SimpleStrategy',
  'replication_factor' : '1'
}

@felixgao
Copy link

yea I would second to have the migration tool have an option to create keyspace if supplied an cql file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants