From 935d6eae83382653e5a1fa8f7b4d3702ea97b5d4 Mon Sep 17 00:00:00 2001 From: Nicholas DiPiazza Date: Sun, 7 Sep 2014 17:37:48 -0500 Subject: [PATCH] add a couple mysql -> postgres types from table on http://en.wikibooks.org/wiki/Converting_MySQL_to_PostgreSQL --- db_converter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db_converter.py b/db_converter.py index 439957b..02d3334 100644 --- a/db_converter.py +++ b/db_converter.py @@ -110,11 +110,11 @@ def parse(input_filename, output_filename): # See if it needs type conversion final_type = None set_sequence = None - if type == "tinyint(1)": + if type.startswith("tinyint"): type = "int4" set_sequence = True final_type = "boolean" - elif type.startswith("int("): + elif type.startswith("int(") or type.startswith("mediumint"): type = "integer" set_sequence = True elif type.startswith("bigint("):