Improved formatting of generated table sql
- Removed empty line before first column - The follow up lines of fkey's are indented - The closing parentheses is now on a new line
This commit is contained in:
parent
2c2253f75e
commit
e53b85bd86
3 changed files with 11 additions and 12 deletions
|
|
@ -118,7 +118,6 @@ QString PgClass::createTableSql() const
|
|||
for (auto && col : cols) {
|
||||
if (col.num > 0 && !col.isdropped) {
|
||||
if (first) {
|
||||
sql += "\n ";
|
||||
first = false;
|
||||
}
|
||||
else sql += ",\n ";
|
||||
|
|
@ -136,10 +135,10 @@ QString PgClass::createTableSql() const
|
|||
first = false;
|
||||
}
|
||||
else sql += ",\n ";
|
||||
sql += getConstraintDefinition(catalog(), constraint);
|
||||
sql += getConstraintDefinition(catalog(), constraint, " ");
|
||||
}
|
||||
|
||||
sql += ")";
|
||||
sql += "\n)";
|
||||
{
|
||||
// [ INHERITS ( parent_table [, ... ] ) ]
|
||||
auto parents = catalog().inherits()->getParentsOf(oid());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue