Class: DataTransformation::Transformer
- Inherits:
-
ActiveRecord::Migrator
- Object
- ActiveRecord::Migrator
- DataTransformation::Transformer
- Defined in:
- lib/data_transformation/transformer.rb
Class Method Summary collapse
- .down ⇒ Object
- .forward ⇒ Object
- .migrations_path ⇒ Object
- .migrations_path=(path) ⇒ Object
- .migrations_paths ⇒ Object
- .rollback ⇒ Object
- .schema_migrations_table_name ⇒ Object
- .transform(transforms_path, target_version = nil) ⇒ Object
Class Method Details
.down ⇒ Object
23 24 25 |
# File 'lib/data_transformation/transformer.rb', line 23 def down raise "Unimplemented as a Transformation" end |
.forward ⇒ Object
27 28 29 |
# File 'lib/data_transformation/transformer.rb', line 27 def forward raise "Unimplemented as a Transformation" end |
.migrations_path ⇒ Object
15 16 17 |
# File 'lib/data_transformation/transformer.rb', line 15 def migrations_path migrations_paths.first end |
.migrations_path=(path) ⇒ Object
19 20 21 |
# File 'lib/data_transformation/transformer.rb', line 19 def migrations_path=(path) @migrations_paths = path end |
.migrations_paths ⇒ Object
10 11 12 13 |
# File 'lib/data_transformation/transformer.rb', line 10 def migrations_paths @migrations_paths ||= ['db/transforms'] Array.wrap(@migrations_paths) end |
.rollback ⇒ Object
31 32 33 |
# File 'lib/data_transformation/transformer.rb', line 31 def rollback raise "Unimplemented as a Transformation" end |
.schema_migrations_table_name ⇒ Object
35 36 37 |
# File 'lib/data_transformation/transformer.rb', line 35 def schema_migrations_table_name ActiveRecord::Base.table_name_prefix + "schema_transforms" + ActiveRecord::Base.table_name_suffix end |
.transform(transforms_path, target_version = nil) ⇒ Object
6 7 8 |
# File 'lib/data_transformation/transformer.rb', line 6 def transform(transforms_path, target_version=nil) migrate(transforms_path, target_version) end |