Fix incorrect ALTER TABLE statement for columns in the instepctor.

Was caused by incorrect condition for determining the use of IDENTITY.
This commit is contained in:
eelke 2019-08-19 19:44:07 +02:00
parent b3352b8496
commit b939916b07
2 changed files with 2 additions and 2 deletions

View file

@ -28,7 +28,7 @@ QString PgAttribute::columnDefinition(const PgDatabaseCatalog &cat) const
if (hasdef)
sql += " DEFAULT " % defaultValue;
if (identity != ' ') {
if (identity != '\0') {
sql += " GENERATED ";
if (identity == 'a') sql += "ALWAYS";
else if (identity == 'd') sql += "BY DEFAULT";