cassandra

package
v1.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

What

This directory contains the cassandra schema for every keyspace that cadence owns. The directory structure is as follows

./schema
   - visibility/           -- Contains schema for visibility data models
   - cadence/              -- Contains schema for default data models
        - keyspace.cql     -- Contains the keyspace definition
        - schema.cql       -- Contains the latest & greatest snapshot of the schema for the keyspace
        - versioned
             - v0.1/
             - v0.2/       -- One directory per schema version change
             - v1.0/
                - manifest.json   -- json file describing the change
                - changes.cql     -- changes in this version, only [CREATE, ALTER] commands are allowed

How

Q: How do I update existing schema ?

  • Add your changes to schema.cql
  • Create a new schema version directory under ./schema/keyspace/versioned/vx.x
    • Add a manifest.json
    • Add your changes in a cql file
  • Update the unit test within ./tools/common/schema/updatetask_test.go TestReadSchemaDirFromEmbeddings with your version x.x
  • Once you are done with these use the ./cadence-cassandra-tool to update the schema

Q: What's the format of manifest.json

Example below:

  • MinCompatibleVersion is the minimum schema version that your code can handle
  • SchemaUpdateCqlFiles are list of .cql files containg your create/alter commands
{
    "CurrVersion": "0.1",
    "MinCompatibleVersion": "0.1",
    "Description": "base version of schema",
    "SchemaUpdateCqlFiles": [
        "base.cql"
    ]
}

Documentation

Index

Constants

View Source
const Version = "0.55"

Version is the Cassandra database release version

View Source
const VisibilityVersion = "0.10"

VisibilityVersion is the Cassandra visibility database release version

Variables

View Source
var (
	DefaultSchema    = common.EmbeddedSchema(SchemaFS, Version, "cadence", "schema.cql")
	VisibilitySchema = common.EmbeddedSchema(SchemaFS, VisibilityVersion, "visibility", "schema.cql")
)
View Source
var SchemaFS embed.FS

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL