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

Support migration reset to version 0 #25

Open
BARJ opened this issue Oct 23, 2017 · 1 comment
Open

Support migration reset to version 0 #25

BARJ opened this issue Oct 23, 2017 · 1 comment

Comments

@BARJ
Copy link

BARJ commented Oct 23, 2017

At this moment it is not possible to undo all migrations.

For example, if version 1 migration is to create table books. And version 2 migration is to add column author to books. You can only undo version 2 migration by running cassandra-migrate reset 1. But you cannot undo version 1 migration by running cassandra-migrate reset 0. Since 0 causes a ValueError

ValueError: Invalid database version, must be a number > 0 or the name of an existing migration

@danielkza
Copy link
Contributor

Reset consists of a dropping the keyspace and running migrations up to a given version afterwards. Since migrating to version 0 isn't supported (as it doesn't make much sense semantically), neither is resetting. Are you looking for a command that erases the keyspace, and just creates the migration state table, without actually running anything? Can you tell me a bit about what you want to achieve?

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

2 participants