Module: Cassie::Schema
- Extended by:
- Configuration, Definition, Versioning
- Defined in:
- lib/cassie/schema.rb,
lib/cassie/schema/queries.rb,
lib/cassie/schema/version.rb,
lib/cassie/schema/migrator.rb,
lib/cassie/schema/migration.rb,
lib/cassie/schema/definition.rb,
lib/cassie/schema/versioning.rb,
lib/cassie/schema/apply_command.rb,
lib/cassie/schema/configuration.rb,
lib/cassie/schema/migration/dsl.rb,
lib/cassie/schema/schema_dumper.rb,
lib/cassie/schema/schema_loader.rb,
lib/cassie/schema/definition/dsl.rb,
lib/cassie/schema/version_loader.rb,
lib/cassie/schema/version_writer.rb,
lib/cassie/schema/rollback_command.rb,
lib/cassie/schema/structure_dumper.rb,
lib/cassie/schema/structure_loader.rb,
lib/cassie/schema/version_file_loader.rb,
lib/cassie/schema/version_object_loader.rb,
lib/cassie/schema/migration/cassandra_support.rb,
lib/cassie/schema/queries/drop_keyspace_query.rb,
lib/cassie/schema/queries/delete_version_query.rb,
lib/cassie/schema/queries/insert_version_query.rb,
lib/cassie/schema/cassandra_migrations/importer.rb,
lib/cassie/schema/queries/create_keyspace_query.rb,
lib/cassie/schema/queries/select_versions_query.rb,
lib/cassie/schema/cassandra_migrations/migration_file.rb,
lib/cassie/schema/queries/create_versions_table_query.rb
Overview
Contains interface and components for managing Cassandra schema using semantically versioned, incremental migration files.
-
Versioned migration files are stored in-repo in ruby files defining
up
anddown
mutation methods. -
Data about what migrations have been applied is stored in Cassandra persistence.
-
The schema state is stored in an in-repo schema file that contains the CQL required to recreate the current schema state/version from scratch.
-
Various
cassie
executable commands provide an interface to manage migrations and versioning.
Run cassie –help to see a list of commands and their descriptions for managing the schema through versioned migrations.
Defined Under Namespace
Modules: CassandraMigrations, Configuration, Definition, Queries, Versioning Classes: AlreadyInitiailizedError, ApplyCommand, CreateKeyspaceQuery, CreateVersionsTableQuery, DeleteVersionQuery, DropKeyspaceQuery, InsertVersionQuery, Migration, Migrator, RollbackCommand, SchemaDumper, SchemaLoader, SelectVersionsQuery, StructureDumper, StructureLoader, UninitializedError, Version, VersionFileLoader, VersionLoader, VersionObjectLoader, VersionWriter
Instance Attribute Summary
Attributes included from Configuration
#schema_keyspace, #versions_table
Class Method Summary collapse
-
.application ⇒ String
The application namespace.
- .application=(app_name) ⇒ Object
Methods included from Configuration
Methods included from Versioning
applied_versions, forget_version, initialize_versioning, local_versions, migration_files, next_version, record_version, version
Methods included from Definition
Class Method Details
.application ⇒ String
The application namespace. Only applicaple When cassie manages multiple application schemas within the same cluster.
27 28 29 30 |
# File 'lib/cassie/schema.rb', line 27 def self.application return @application if defined?(@application) "global" end |
.application=(app_name) ⇒ Object
32 33 34 |
# File 'lib/cassie/schema.rb', line 32 def self.application=(app_name) @application = app_name end |