{"id":37028599,"url":"https://github.com/elo7/cassandra-migration","last_synced_at":"2026-01-14T03:25:25.355Z","repository":{"id":57719049,"uuid":"62654035","full_name":"elo7/cassandra-migration","owner":"elo7","description":"Database migration (evolution) tool for Apache Cassandra","archived":false,"fork":true,"pushed_at":"2018-02-19T12:41:56.000Z","size":209,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":65,"default_branch":"master","last_synced_at":"2025-07-20T08:23:11.532Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"Contrast-Security-OSS/cassandra-migration","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elo7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-05T16:54:38.000Z","updated_at":"2019-07-03T20:49:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/elo7/cassandra-migration","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/elo7/cassandra-migration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elo7%2Fcassandra-migration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elo7%2Fcassandra-migration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elo7%2Fcassandra-migration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elo7%2Fcassandra-migration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elo7","download_url":"https://codeload.github.com/elo7/cassandra-migration/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elo7%2Fcassandra-migration/sbom","scorecard":{"id":373678,"data":{"date":"2024-07-29","repo":{"name":"github.com/elo7/cassandra-migration","commit":"f77e43a899391ae1bf06a2b0ed228d5f6814b739"},"scorecard":{"version":"v5.0.0-5-g2aa077c4","commit":"2aa077c4fc2728eb9d70fa4c44ad55be99d73b16"},"score":2,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/25 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/2aa077c4fc2728eb9d70fa4c44ad55be99d73b16/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/2aa077c4fc2728eb9d70fa4c44ad55be99d73b16/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/2aa077c4fc2728eb9d70fa4c44ad55be99d73b16/docs/checks.md#cii-best-practices"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/2aa077c4fc2728eb9d70fa4c44ad55be99d73b16/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/2aa077c4fc2728eb9d70fa4c44ad55be99d73b16/docs/checks.md#license"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/2aa077c4fc2728eb9d70fa4c44ad55be99d73b16/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/2aa077c4fc2728eb9d70fa4c44ad55be99d73b16/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/2aa077c4fc2728eb9d70fa4c44ad55be99d73b16/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/2aa077c4fc2728eb9d70fa4c44ad55be99d73b16/docs/checks.md#binary-artifacts"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/2aa077c4fc2728eb9d70fa4c44ad55be99d73b16/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/2aa077c4fc2728eb9d70fa4c44ad55be99d73b16/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/2aa077c4fc2728eb9d70fa4c44ad55be99d73b16/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/2aa077c4fc2728eb9d70fa4c44ad55be99d73b16/docs/checks.md#fuzzing"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 10 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/2aa077c4fc2728eb9d70fa4c44ad55be99d73b16/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":2,"reason":"8 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-5mg8-w23w-74h3","Warn: Project is vulnerable to: GHSA-7g45-4rm6-3mm3","Warn: Project is vulnerable to: GHSA-mvr2-9pj6-7w5j","Warn: Project is vulnerable to: GHSA-9vjp-v76f-g363","Warn: Project is vulnerable to: GHSA-grg4-wf29-r9vv","Warn: Project is vulnerable to: GHSA-6mjq-h674-j845","Warn: Project is vulnerable to: GHSA-p2v9-g2qv-p635","Warn: Project is vulnerable to: GHSA-rv63-gqm8-9w8q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/2aa077c4fc2728eb9d70fa4c44ad55be99d73b16/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T13:36:38.247Z","repository_id":57719049,"created_at":"2025-08-18T13:36:38.247Z","updated_at":"2025-08-18T13:36:38.247Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T03:25:24.761Z","updated_at":"2026-01-14T03:25:25.338Z","avatar_url":"https://github.com/elo7.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Cassandra Migration\n========\n\nA simple and lightweight migration tool for Apache Cassandra database that's based on [Axel Fontaine's Flyway project](https://github.com/flyway/flyway).\nCassandra Migration works just like Flyway. Plain CQL and Java based migrations are supported.\nThe Java migration interface provides [DataStax's Java Driver](http://datastax.github.io/java-driver/) session.\n\n## Why not create an extension to an existing popular database migration project (i.e. Flyway)?\nPopular database migration tools, such as Flyway and Liquibase are tailored for relational databases with JDBC. This project exists because...\n* Cassandra is not a relational database\n* Cassandra does not have transactions\n* Cassandra currently does not have production-ready JDBC implementation\n* It does not make sense to attempt implementing parity with relational database functions like global sequence IDs for Cassandra\n* Cassandra's keyspace should be managed outside the migration tool for sysadmins to configure replication factor, etc\n* CQL != SQL\n* The tool should be tailored to Cassandra, especially from the perspective of its distributed architecture\n* I already use Flyway and I do not want to maintain my own version of Flyway with Cassandra hacks\n\n## Requirements\n* Java (Tested with JDK 7+)\n* Apache Cassandra (Tested with 2.1.5+)\n* Pre-populated keyspace\n* Cassandra Migration library\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.contrastsecurity\u003c/groupId\u003e\n    \u003cartifactId\u003ecassandra-migration\u003c/artifactId\u003e\n    \u003cversion\u003e0.6\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Migration version table\n```\ncassandra@cqlsh:cassandra_migration_test\u003e select * from cassandra_migration_version;\n type        | version | checksum    | description    | execution_time | installed_by | installed_on             | installed_rank | script                                 | success | version_rank\n-------------+---------+-------------+----------------+----------------+--------------+--------------------------+----------------+----------------------------------------+---------+--------------\n         CQL |   1.0.0 |   985950023 |          First |             88 |    cassandra | 2015-09-12 15:10:22-0400 |              1 |                      V1_0_0__First.cql |    True |            1\n         CQL |   1.1.2 |  2095193138 |  Late arrival2 |              3 |    cassandra | 2015-09-12 15:10:23-0400 |              5 |              V1_1_2__Late_arrival2.cql |    True |            2\n         CQL |   1.1.3 | -1648933960 |  Late arrival3 |             15 |    cassandra | 2015-09-12 15:10:23-0400 |              6 |              V1_1_3__Late_arrival3.cql |    True |            3\n         CQL |   2.0.0 |  1899485431 |         Second |            154 |    cassandra | 2015-09-12 15:10:22-0400 |              2 |                     V2_0_0__Second.cql |    True |            4\n JAVA_DRIVER |     3.0 |        null |          Third |              3 |    cassandra | 2015-09-12 15:10:22-0400 |              3 |            migration.integ.V3_0__Third |    True |            5\n JAVA_DRIVER |   3.0.1 |        null | Three zero one |              2 |    cassandra | 2015-09-12 15:10:22-0400 |              4 | migration.integ.V3_0_1__Three_zero_one |    True |            6\n```\n\n## Supported Migration Script Types\n### .cql files\nExample:\n```\nCREATE TABLE test1 (\n  space text,\n  key text,\n  value text,\n  PRIMARY KEY (space, key)\n) with CLUSTERING ORDER BY (key ASC);\n\nINSERT INTO test1 (space, key, value) VALUES ('foo', 'blah', 'meh');\n\nUPDATE test1 SET value = 'profit!' WHERE space = 'foo' AND key = 'blah';\n```\n\n### Java classes\nExample:\n```\npublic class V3_0__Third implements JavaMigration {\n\n    @Override\n    public void migrate(Session session) throws Exception {\n        Insert insert = QueryBuilder.insertInto(\"test1\");\n        insert.value(\"space\", \"web\");\n        insert.value(\"key\", \"google\");\n        insert.value(\"value\", \"google.com\");\n\n        session.execute(insert);\n    }\n}\n```\n\n## Interface\n### Java API\nExample:\n```\nString[] scriptsLocations = {\"migration/cassandra\"};\n\nKeyspace keyspace = new Keyspace();\nkeyspace.setName(CASSANDRA__KEYSPACE);\nkeyspace.getCluster().setContactpoints(CASSANDRA_CONTACT_POINT);\nkeyspace.getCluster().setPort(CASSANDRA_PORT);\nkeyspace.getCluster().setUsername(CASSANDRA_USERNAME);\nkeyspace.getCluster().setPassword(CASSANDRA_PASSWORD);\n\nCassandraMigration cm = new CassandraMigration();\ncm.getConfigs().setScriptsLocations(scriptsLocations);\ncm.setKeyspace(keyspace);\ncm.migrate();\n```\n\n### Command line\n```\njava -jar \\\n-Dcassandra.migration.scripts.locations=file:target/test-classes/migration/integ \\\n-Dcassandra.migration.cluster.contactpoints=localhost \\\n-Dcassandra.migration.cluster.port=9147 \\\n-Dcassandra.migration.cluster.username=cassandra \\\n-Dcassandra.migration.cluster.password=cassandra \\\n-Dcassandra.migration.keyspace.name=cassandra_migration_test \\\ntarget/*-jar-with-dependencies.jar migrate\n```\n\nLogging level can be set by passing the following arguments:\n* INFO: This is the default\n* DEBUG: '-X'\n* WARNING: '-q'\n\n## VM Options\nOptions can be set either programmatically with API or via VM options.\n\nMigration\n* cassandra.migration.scripts.locations: Locations of the migration scripts in CSV format. Scripts are scanned in the specified folder recursively. (default=db/migration)\n* cassandra.migration.scripts.encoding: The encoding of CQL scripts (default=UTF-8)\n* cassandra.migration.scripts.allowoutoforder: Allow out of order migration (default=false)\n* cassandra.migration.version.target: The target version. Migrations with a higher version number will be ignored. (default=latest)\n\nCluster\n* cassandra.migration.cluster.contactpoints: Comma separated values of node IP addresses (default=localhost)\n* cassandra.migration.cluster.port: CQL native transport port (default=9042)\n* cassandra.migration.cluster.username: Username for password authenticator (optional)\n* cassandra.migration.cluster.password: Password for password authenticator (optional)\n\nKeyspace\n* cassandra.migration.keyspace.name: Name of Cassandra keyspace (required)\n\n## Cluster Coordination\n* Schema version tracking statements use ConsistencyLevel.ALL\n* Users should manage their own consistency level in the migration scripts\n\n## Limitations\n* Baselining not supported yet\n* The tool does not roll back the database upon migration failure. You're expected to manually restore backup.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felo7%2Fcassandra-migration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felo7%2Fcassandra-migration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felo7%2Fcassandra-migration/lists"}