Method: Neo4j::Migration::AddIdProperty#migrate

Defined in:
lib/neo4j/migration.rb

#migrateObject



43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/neo4j/migration.rb', line 43

def migrate
  ActiveSupport::Deprecation.warn '`AddIdProperty` task is deprecated and may be removed from future releases. '\
                                  'Create a new migration and use the `populate_id_property` helper.', caller
  models = ActiveSupport::HashWithIndifferentAccess.new(YAML.load_file(models_filename))[:models]
  output 'This task will add an ID Property every node in the given file.'
  output 'It may take a significant amount of time, please be patient.'
  models.each do |model|
    output
    output
    output "Adding IDs to #{model}"
    populate_id_property model
  end
end