Skip to content

Commit 1ac0d14

Browse files
committed
Add conversion for char/varchar
1 parent cfa61c9 commit 1ac0d14

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/NHibernate/Dialect/Schema/PostgreSQLMetadata.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ private static string Normalize(string typeName)
157157
return "int8";
158158
}
159159

160+
if (typeName.StartsWith("character"))
161+
{
162+
return typeName.Replace("character varying", "varchar").Replace("character", "char");
163+
}
164+
160165
if (typeName.EndsWith("with timezone"))
161166
{
162167
return (typeName.StartsWith("timestamp")
@@ -169,7 +174,7 @@ private static string Normalize(string typeName)
169174
{
170175
return typeName.Replace("without timezone", "").Trim();
171176
}
172-
177+
173178
return typeName;
174179
}
175180
}

0 commit comments

Comments
 (0)