migrate: renamed table

This commit is contained in:
Michał Matczuk
2017-09-25 10:01:48 +02:00
parent f2af2384ed
commit 9604635e8e

View File

@@ -21,7 +21,7 @@ import (
"github.com/scylladb/gocqlx/qb" "github.com/scylladb/gocqlx/qb"
) )
var infoSchema = `CREATE TABLE IF NOT EXISTS gocqlx_migrations ( var infoSchema = `CREATE TABLE IF NOT EXISTS gocqlx_migrate (
name text, name text,
checksum text, checksum text,
done tinyint, done tinyint,
@@ -30,7 +30,7 @@ var infoSchema = `CREATE TABLE IF NOT EXISTS gocqlx_migrations (
PRIMARY KEY(name) PRIMARY KEY(name)
)` )`
var selectInfo = "SELECT * FROM gocqlx_migrations" var selectInfo = "SELECT * FROM gocqlx_migrate"
// Info contains information on migration applied on a database. // Info contains information on migration applied on a database.
type Info struct { type Info struct {
@@ -136,7 +136,7 @@ func applyMigration(ctx context.Context, session *gocql.Session, path string, do
Checksum: checksum(b), Checksum: checksum(b),
} }
stmt, names := qb.Insert("gocqlx_migrations").Columns( stmt, names := qb.Insert("gocqlx_migrate").Columns(
"name", "name",
"checksum", "checksum",
"done", "done",