Class: SchemaEvolutionManager::MigrationFile
- Inherits:
-
Object
- Object
- SchemaEvolutionManager::MigrationFile
- Defined in:
- lib/schema-evolution-manager/migration_file.rb
Overview
Represents a single file to make a schema migration, typically stored in the scripts subdirectory.
Defined Under Namespace
Classes: Attribute, AttributeValue
Constant Summary collapse
- DEFAULTS =
[AttributeValue.new("transaction", "single")]
Instance Attribute Summary collapse
-
#attribute_values ⇒ Object
readonly
Returns the value of attribute attribute_values.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path) ⇒ MigrationFile
constructor
A new instance of MigrationFile.
Constructor Details
#initialize(path) ⇒ MigrationFile
Returns a new instance of MigrationFile.
49 50 51 52 53 |
# File 'lib/schema-evolution-manager/migration_file.rb', line 49 def initialize(path) @path = path Preconditions.check_state(File.exist?(@path), "File[#{@path}] does not exist") @attribute_values = parse_attribute_values end |
Instance Attribute Details
#attribute_values ⇒ Object (readonly)
Returns the value of attribute attribute_values.
47 48 49 |
# File 'lib/schema-evolution-manager/migration_file.rb', line 47 def attribute_values @attribute_values end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
47 48 49 |
# File 'lib/schema-evolution-manager/migration_file.rb', line 47 def path @path end |