Giter VIP home page Giter VIP logo

cassandra-migrate's People

Contributors

dannysu avatar gflarity avatar karan-incroud avatar keswanikaran avatar mjarmoc avatar rleenders avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cassandra-migrate's Issues

Add config option: migration directory

Migration files are created and execution happens in the current working directory (process.cwd).
A directory could be created for the migrations, cd into it and run the commands in there.

It would be more user-friendly if the migrations directory could be specified in the options, so the migration scripts can be run from the project root (thus more easily via npm run).

How do I create keyspace in migration

Can't have a migration that will create a keyspace because the package trying to create sys_cassandra_migrations before first migration run
For example a command fail
cassandra-migrate up -k test -u cassandra -p cassandra
if test keyspace not exists and I want to run a migration with
CREATE KEYSPACE IF NOT EXISTS test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1 };

Expand command list for more explicit functionality

instead of relying solely on desired state migration specification which can get unclear at times (if I roll back to migration N, does that include rolling back N or keeping N applied, how to roll back all migrations including the 1st one, etc)

it would be smart to include explicit directional commands ie:
cassandra-migrate apply (to increment up one migration)
cassandra-migrate apply -a (to run all pending migrations)
cassandra-migrate apply -n ( to migrate up to and including a specified migration)

cassandra-migrate rollback (to rollback one migration)
cassandra-migrate rollback -a (to rollback all applied migrations)
cassandra-migrate rollback -n (to rollback down to and including the specified migration)

this should also simplify some of the parsing since we know explicitly which direction the user intends to go

show migration status

add a status command to show the following

  1. latest applied migration
  2. all applied migrations
  3. all migrations available but not applied

Add skip function

Add some functionality to manually enter a migration in the migration table

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.