github.com/kubecost/golang-migrate-duckdb/v4@v4.17.0-duckdb.1/database/cassandra/README.md (about)

     1  # Cassandra
     2  
     3  * Drop command will not work on Cassandra 2.X because it rely on
     4  system_schema table which comes with 3.X
     5  * Other commands should work properly but are **not tested**
     6  * 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:
     7    * 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.
     8    * The queries are not executed in any sort of transaction/batch, meaning you are responsible for fixing partial migrations.
     9  
    10  
    11  ## Usage
    12  `cassandra://host:port/keyspace?param1=value&param2=value2`
    13  
    14  
    15  | URL Query  | Default value | Description |
    16  |------------|-------------|-----------|
    17  | `x-migrations-table` | schema_migrations | Name of the migrations table |
    18  | `x-multi-statement` | false | Enable multiple statements to be ran in a single migration (See note above) |
    19  | `port` | 9042 | The port to bind to  |
    20  | `consistency` | ALL | Migration consistency
    21  | `protocol` |  | Cassandra protocol version (3 or 4)
    22  | `timeout` | 1 minute | Migration timeout
    23  | `connect-timeout` | 600ms | Initial connection timeout to the cluster |
    24  | `username` | nil | Username to use when authenticating. |
    25  | `password` | nil | Password to use when authenticating. |
    26  | `sslcert` | | Cert file location. The file must contain PEM encoded data. |
    27  | `sslkey` | | Key file location. The file must contain PEM encoded data. |
    28  | `sslrootcert` | | The location of the root certificate file. The file must contain PEM encoded data. |
    29  | `sslmode` | | Whether or not to use SSL (disable\|require\|verify-ca\|verify-full) |
    30  | `disable-host-lookup`| false | Disable initial host lookup. |
    31  
    32  `timeout` is parsed using [time.ParseDuration(s string)](https://golang.org/pkg/time/#ParseDuration)
    33  
    34  
    35  ## Upgrading from v1
    36  
    37  1. Write down the current migration version from schema_migrations
    38  2. `DROP TABLE schema_migrations`
    39  4. Download and install the latest migrate version.
    40  5. Force the current migration version with `migrate force <current_version>`.