Skip to content

Commit 60620d5

Browse files
authored
Fix PostgreSQL CharacterMaxLenght difference (#94)
1 parent 59db7c0 commit 60620d5

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": "coreclr",
77
"request": "launch",
88
"preLaunchTask": "Build UI",
9-
"program": "${workspaceFolder}/SQLSchemaCompare.UI/bin/Debug/net8.0/TiCodeX.SQLSchemaCompare.UI.dll",
9+
"program": "${workspaceFolder}/SQLSchemaCompare.UI/bin/Debug/net8.0/win-x64/TiCodeX.SQLSchemaCompare.UI.dll",
1010
"cwd": "${workspaceFolder}/SQLSchemaCompare.UI",
1111
"presentation": {
1212
"hidden": true,

SQLSchemaCompare.Infrastructure/SqlScripters/PostgreSqlScripter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ protected override string ScriptAlterTable(ABaseDbTable t)
108108
throw new ArgumentException("Wrong column type");
109109
}
110110

111-
if (col.DataType != mappedCol.DataType)
111+
if (col.DataType != mappedCol.DataType || col.CharacterMaxLenght != mappedCol.CharacterMaxLenght)
112112
{
113113
sb.Append($"ALTER TABLE {this.ScriptHelper.ScriptObjectName(t)} ALTER COLUMN ");
114114
sb.AppendLine($"{this.ScriptHelper.ScriptObjectName(col.Name)} TYPE {this.ScriptHelper.ScriptDataType(col)};");

0 commit comments

Comments
 (0)