notes/brainstorming.txt
[app.Builder.js] / dbgenerate.js
index e20acdd..5d2d001 100644 (file)
@@ -273,7 +273,7 @@ switch(cfg.DBTYPE) {
                 
         break;
     default:
-        throw new Exception("Invalid data base type " + cfg.DBTYPE + " should be MySQL or PostgreSQL");
+        throw "Invalid data base type " + cfg.DBTYPE + " should be MySQL or PostgreSQL";
 /*
            "Field": "province",
         "Type": "varchar(255)",
@@ -309,8 +309,8 @@ tables.forEach(function(table) {
     //print(JSON.stringify(schema, null,4));    Seed.quit();
     
     schema.forEach(function(e)  {
-        e.Type = e.type;
-        e.Field = e.field;
+        e.Type = e.Type || e.type;
+        e.Field = e.Field || e.field;
          
         var type = e.Type.match(/([^(]+)\(([^\)]+)\)/);
         var row  = { };