1.0.13 • Published 4 years ago

cql-migration v1.0.13

Weekly downloads
-
License
-
Repository
-
Last release
4 years ago

Simple Cassandra Migration

Installation

npm i -g cql-migration

Config

create new file name .migration.js

module.exports = {
    dir: './examples',
    url: '127.0.0.1:9042',
    keyspace: 'dp',
    username: 'cassandra',
    password: 'cassandra',
    dataCenter: 'datacenter1',
    extraOptions: {}
}

File Format

[version]_[name].[cql/sql]

example: 1_create_user_table.cql

Example migration cql

--- up
create type sample_type (
    data text
)
---
create table sample (
    id text PRIMARY KEY,
    name text
)

--- down
drop type sample_type;
---
drop table sample;

Commands

count is optional

cql-migration up [count]

count default 1

cql-migration down [count]
1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago