Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. try {
  2. projects.each { node ->
  3. old_id = node.ref_id
  4. new_id = old_to_new_ids[old_id]
  5. index.remove('project', old_id, node)
  6. node.ref_id = new_id
  7. index.put('project', new_id, node)
  8. }
  9. } catch (Throwable e) {
  10. println(e)
  11. } finally {
  12. g.shutdown()
  13. }
  14.  
  15. EmbeddedGraphDatabase db = new EmbeddedGraphDatabase(dbFilename);
  16. Transaction tx = db.beginTx();
  17. PropertyContainer properties = db.getNodeManager().getGraphProperties();
  18. properties.setProperty("schema_version", 3);
  19. tx.success();
  20. tx.finish();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement