package
4.15.3
Repository: https://github.com/sfinks80/golang-migrate.git
Documentation: pkg.go.dev

# README

Cassandra

  • Drop command will not work on Cassandra 2.X because it rely on system_schema table which comes with 3.X
  • Other commands should work properly but are not tested
  • The Cassandra driver (gocql) does not natively support executing multiple statements in a single query. To allow for multiple statements in a single migration, you can use the x-multi-statement param. There are two important caveats:
    • This mode splits the migration text into separately-executed statements by a semi-colon ;. Thus x-multi-statement cannot be used when a statement in the migration contains a string with a semi-colon.
    • The queries are not executed in any sort of transaction/batch, meaning you are responsible for fixing partial migrations.

Usage

cassandra://host:port/keyspace?param1=value&param2=value2

URL QueryDefault valueDescription
x-migrations-tableschema_migrationsName of the migrations table
x-multi-statementfalseEnable multiple statements to be ran in a single migration (See note above)
port9042The port to bind to
consistencyALLMigration consistency
protocolCassandra protocol version (3 or 4)
timeout1 minuteMigration timeout
connect-timeout600msInitial connection timeout to the cluster
usernamenilUsername to use when authenticating.
passwordnilPassword to use when authenticating.
sslcertCert file location. The file must contain PEM encoded data.
sslkeyKey file location. The file must contain PEM encoded data.
sslrootcertThe location of the root certificate file. The file must contain PEM encoded data.
sslmodeWhether or not to use SSL (disable|require|verify-ca|verify-full)
disable-host-lookupfalseDisable initial host lookup.

timeout is parsed using time.ParseDuration(s string)

Upgrading from v1

  1. Write down the current migration version from schema_migrations
  2. DROP TABLE schema_migrations
  3. Download and install the latest migrate version.
  4. Force the current migration version with migrate force <current_version>.

# Functions

No description provided by the author

# Variables

No description provided by the author
10 MB.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author