891f9aeae5e65a5d5ff107479b1f5830b67312c5 max Thu May 11 15:54:47 2017 -0700 small fix to sqlToAs, for interactions track diff --git src/oneShot/sqlToAs/sqlToAs src/oneShot/sqlToAs/sqlToAs index ce86246..0f4e550 100755 --- src/oneShot/sqlToAs/sqlToAs +++ src/oneShot/sqlToAs/sqlToAs @@ -30,30 +30,31 @@ "smallint": "short", "smallint unsigned": "ushort", "tinyint": "byte", "tinyint unsigned": "ubyte", "bigint": "bigint", "varchar": "string", "longblob":"lstring", "blob" : "lstring", "enum": "enum", "set": "set" } fieldLines = [] tableCommentDone = False +tableComment = "" for line in open(filename).read().splitlines(): line = line.strip() lowLine = line.lower() logging.debug(line) if len(line)<=3: continue if line.startswith("#"): if tableCommentDone: continue tableComment = '"%s"' % line.strip().strip("#") tableCommentDone = True elif line.startswith("CREATE TABLE"): name = line.split()[2].strip("`") tableLine = "table %s" % name