db-journey / cassandra-driver Goto Github PK
View Code? Open in Web Editor NEWCassandra driver
License: MIT License
Cassandra driver
License: MIT License
It looks as though the migrateCommand arguments are not working.
If I send journey --url cassandra://127.0.0.1:9042/keyspace --path ./migrations migrate m -1
it looks as though relativeNInt, err := strconv.Atoi(relativeN)
is trying to parse ctx.Args().First()
, where the correct argument should be ctx.Args()[2]
.
So change the following code:
Action: func(ctx *cli.Context) error {
relativeN := ctx.Args().First()
relativeNInt, err := strconv.Atoi(relativeN)
if err != nil {
logErr(err).Fatal("Unable to parse param <n>")
}
log.Infof("Applying %d migrations", relativeNInt)
pipe := pipep.New()
go migrate.Migrate(pipe, ctx.GlobalString("url"), ctx.GlobalString("path"), relativeNInt)
ok := readPipe(pipe)
if !ok {
os.Exit(1)
}
logCurrentVersion(ctx.GlobalString("url"), ctx.GlobalString("path"))
return nil
},
to:
Action: func(ctx *cli.Context) error {
relativeN := ctx.Args()[2]
relativeNInt, err := strconv.Atoi(relativeN)
if err != nil {
logErr(err).Fatal("Unable to parse param <n>")
}
log.Infof("Applying %d migrations", relativeNInt)
pipe := pipep.New()
go migrate.Migrate(pipe, ctx.GlobalString("url"), ctx.GlobalString("path"), relativeNInt)
ok := readPipe(pipe)
if !ok {
os.Exit(1)
}
logCurrentVersion(ctx.GlobalString("url"), ctx.GlobalString("path"))
return nil
},
if I have version 1, 2, 3, 4, 5 (all created in that order), and I am currently at 5. If I use migrate goto 3
, it applies the down for all versions.
Hi,
dn-journey Cassandra driver will not compile due to commit 21155bb
line 45: consistency, err := gocql.ParseConsistency(consistencyStr)
gocql.ParseConsistency returns 1 value. this line of code is expecting 2 return values. Exact line of output from the build:
/go/src/github.com/db-journey/cassandra-driver/cassandra.go:45: assignment count mismatch: 2 = 1
Is there any way you could tag commit 1063bea with a version?
Thanks for all you do. I am hoping to update to the newest versions soon, and will help create more PR's for some bug fixes I have found
Function signature for ParseConsistency changed in the following pull-request:
https://github.com/gocql/gocql/pull/983/files#diff-38a0fa12b0c511105c3a411f0df3e318R230
cassandra.go:191: multiple-value gocql.ParseConsistency() in single-value context
An easy fix could be to use MustParseConsistency
instead, but unsure if this issue should be in this repo or at gocql.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.