1.0.13 • Published 3 years ago

cql-migration v1.0.13

Weekly downloads
-
License
-
Repository
-
Last release
3 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

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago