Fix constraints handling in ddl2cpp (#437)

Constraints got interpreted as (unknown) data types.
This change should fix this most cases (simple test case added).
This commit is contained in:
Roland Bock
2022-04-09 21:47:21 +02:00
parent 1d5caca523
commit b50cc454b6
2 changed files with 4 additions and 3 deletions

View File

@@ -28,12 +28,13 @@ CREATE TABLE tab_foo
(
delta varchar(255),
_epsilon bigint,
`omega` double
`omega` double,
CONSTRAINT uc_delta UNIQUE (delta, _epsilon)
);
CREATE TABLE tab_bar
(
alpha bigint AUTO_INCREMENT,
alpha bigint AUTO_INCREMENT RRIMARY_KEY,
beta varchar(255) NULL DEFAULT "",
gamma bool NOT NULL,
delta int