Class: ActiveGraph::Migrations::Base
- Inherits:
 - 
      Object
      
        
- Object
 - ActiveGraph::Migrations::Base
 
 
- Includes:
 - Helpers, Helpers::IdProperty, Helpers::Relationships, Helpers::Schema
 
- Defined in:
 - lib/active_graph/migrations/base.rb
 
Constant Summary
Constants included from Helpers::Relationships
Helpers::Relationships::DEFAULT_MAX_PER_BATCH
Constants included from Helpers::Schema
Helpers::Schema::DUPLICATE_CONSTRAINT_OR_INDEX, Helpers::Schema::MISSING_CONSTRAINT_OR_INDEX
Constants included from Helpers
Helpers::PROPERTY_ALREADY_DEFINED
Instance Method Summary collapse
- #down ⇒ Object
 - 
  
    
      #initialize(migration_id, options = {})  ⇒ Base 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Base.
 - #migrate(method) ⇒ Object
 - #up ⇒ Object
 
Methods included from Helpers::Relationships
#change_relations_style, #relabel_relation
Methods included from Helpers::IdProperty
Methods included from Helpers::Schema
#add_constraint, #add_index, #drop_constraint, #drop_index
Methods included from Helpers
#add_label, #add_labels, #drop_nodes, #execute, #query, #remove_label, #remove_labels, #remove_property, #rename_label, #rename_property, #say, #say_with_time
Constructor Details
#initialize(migration_id, options = {}) ⇒ Base
Returns a new instance of Base.
      9 10 11 12  | 
    
      # File 'lib/active_graph/migrations/base.rb', line 9 def initialize(migration_id, = {}) @migration_id = migration_id @silenced = [:silenced] end  | 
  
Instance Method Details
#down ⇒ Object
      24 25 26  | 
    
      # File 'lib/active_graph/migrations/base.rb', line 24 def down fail NotImplementedError end  | 
  
#migrate(method) ⇒ Object
      14 15 16 17 18  | 
    
      # File 'lib/active_graph/migrations/base.rb', line 14 def migrate(method) Benchmark.realtime do method == :up ? migrate_up : migrate_down end end  | 
  
#up ⇒ Object
      20 21 22  | 
    
      # File 'lib/active_graph/migrations/base.rb', line 20 def up fail NotImplementedError end  |