+ if (type == ImportType.SAMPLE_DATA) {
+ String fl = sql.split("\n")[0];
+ if (fl.matches("--Version: ([0-9]+)")) {
+ int v0 = Integer.parseInt(fl.substring(11));
+ if (DatabaseConnection.CURRENT_SCHEMA_VERSION < v0) {
+ System.out.println("skipping sample data (data has version " + v0 + ", db has version " + DatabaseConnection.CURRENT_SCHEMA_VERSION + ")");
+ return;
+ }
+ }
+ }
+ sql = sql.replaceAll("--[^\n]*\n", "\n");
+ sql = sql.replaceAll("#[^\n]*\n", "\n");