Skip to content

Commit

Permalink
Basic migration support.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwigway committed Mar 3, 2015
1 parent 5de8910 commit bba3805
Show file tree
Hide file tree
Showing 4 changed files with 419 additions and 26 deletions.
13 changes: 13 additions & 0 deletions app/controllers/Bootstrap.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package controllers;

import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.math.BigInteger;
import java.util.ArrayList;
Expand All @@ -11,6 +12,7 @@
import java.util.NoSuchElementException;
import java.util.Set;

import datastore.MigrateToMapDB;
import org.geotools.geometry.jts.JTS;
import org.opengis.referencing.operation.TransformException;

Expand Down Expand Up @@ -152,5 +154,16 @@ public static void createAgency( String gtfsId, String name, String url, @Requir

Bootstrap.index();
}

// TODO wrong place to have this.
public static void migrate () {
try {
new MigrateToMapDB().migrate(new File("dump"));
ok();
} catch (Exception e) {
e.printStackTrace();
badRequest();
}
}
}

Loading

2 comments on commit bba3805

@markjd84
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Matt. Is this migration support ready to be used? Can't see how to invoke (but I'm not very familiar with Play other than for this). Cheers!

@mattwigway
Copy link
Contributor Author

@mattwigway mattwigway commented on bba3805 Mar 9, 2015 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.