Class: Cequel::Schema::MigrationValidator Private

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/cequel/schema/migration_validator.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

This is a utility class to test that it is possible to perform a given table schema migration

Since:

  • 1.0.0

API:

  • private

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(synchronizer) ⇒ MigrationValidator

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of MigrationValidator.

Since:

  • 1.0.0

API:

  • private



26
27
28
# File 'lib/cequel/schema/migration_validator.rb', line 26

def initialize(synchronizer)
  @synchronizer = synchronizer
end

Class Method Details

.validate!(synchronizer) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Check for various impossible schema changes and raise if any are found

Since:

  • 1.0.0

API:

  • private



19
20
21
# File 'lib/cequel/schema/migration_validator.rb', line 19

def self.validate!(synchronizer)
  new(synchronizer).validate!
end

Instance Method Details

#validate!Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Check for various impossible schema changes and raise if any are found

Raises:

  • if it is impossible to modify existing table to match desired schema

Since:

  • 1.0.0

API:

  • private



36
37
38
39
# File 'lib/cequel/schema/migration_validator.rb', line 36

def validate!
  assert_keys_match!
  assert_data_columns_match!
end