From b64ec8b8b870e49a05679a7ad5f4319f137f6692 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Sat, 5 Nov 2022 10:36:43 +0100 Subject: [PATCH] Accept additional SQL type time --- setup.cfg | 2 +- src/procrusql/parser.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 9ab8553..e95301f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = ProcruSQL -version = 0.0.9 +version = 0.0.10 author = Peter J. Holzer author_email = hjp@hjp.at description = Make a database fit its description diff --git a/src/procrusql/parser.py b/src/procrusql/parser.py index 27e3345..5ee3a44 100755 --- a/src/procrusql/parser.py +++ b/src/procrusql/parser.py @@ -289,7 +289,8 @@ def parse_column_definition(ps): "int", "integer", "serial", "boolean", "text", "character varying", - "date", "timestamp with time zone", "timestamptz" + "date", "timestamp with time zone", "timestamptz", + "time", ) pattern = "(" + "|".join(sqltypes) + ")" + r"([ \t]+(default .*|not null\b|primary key\b|unique\b|references \w+\b))*" m = ps2.match(pattern)