Repository: typeorm/typeorm
File: src/driver/postgres/PostgresQueryRunner.ts (TypeScript)

Code before:
        // if createForeignKeys is true, we must drop created foreign keys in down query.
        // createTable does not need separate method to create foreign keys, because it create fk's in the same query with table creation.
        if (createForeignKeys)
            table.foreignKeys.forEach((foreignKey) =>
                downQueries.push(this.dropForeignKeySql(table, foreignKey)),
            )

        if (createIndices) {
            table.indices.forEach((index) => {
                // new index may be passed without name. In this case we generate index name manually.
                if (!index.name)
                    index.name = this.connection.namingStrategy.indexName(
                        table,
                        index.columnNames,
                        index.where,
                    )
                upQueries.push(this.createIndexSql(table, index))
                downQueries.push(this.dropIndexSql(table, index))
            })
        }

        if (table.comment) {
            upQueries.push(
                new Query(
                    `COMMENT ON TABLE ${this.escapePath(table)}
                    IS ${this.escapeComment(table.comment)}`,
                ),
            )
            downQueries.push(
                new Query(
                    `COMMENT ON TABLE ${this.escapePath(table)}
                    IS NULL`,
                ),
            )
        }

        await this.executeQueries(upQueries, downQueries)
    }

    /**
     * Drops the table.
     * @param target
     * @param ifExist
     * @param dropForeignKeys
     * @param dropIndices
     */
    async dropTable(
        target: Table | string,
        ifExist?: boolean,
        dropForeignKeys: boolean = true,
        dropIndices: boolean = true,

Review comment (suggestion):
We should avoid unnecessary white space in query strings, since they are displayed to the users when logged.

Applies throughout the entire PR.

Code after:
        // if createForeignKeys is true, we must drop created foreign keys in down query.
        // createTable does not need separate method to create foreign keys, because it create fk's in the same query with table creation.
        if (createForeignKeys)
            table.foreignKeys.forEach((foreignKey) =>
                downQueries.push(this.dropForeignKeySql(table, foreignKey)),
            )

        if (createIndices) {
            table.indices.forEach((index) => {
                // new index may be passed without name. In this case we generate index name manually.
                if (!index.name)
                    index.name = this.connection.namingStrategy.indexName(
                        table,
                        index.columnNames,
                        index.where,
                    )
                upQueries.push(this.createIndexSql(table, index))
                downQueries.push(this.dropIndexSql(table, index))
            })
        }

        if (table.comment) {
            upQueries.push(
                new Query(
                    `COMMENT ON TABLE ${this.escapePath(table)}` +
                        ` IS ${this.escapeComment(table.comment)}`,
                ),
            )
            downQueries.push(
                new Query(
                    `COMMENT ON TABLE ${this.escapePath(table)}` + ` IS NULL`,
                ),
            )
        }

        await this.executeQueries(upQueries, downQueries)
    }

    /**
     * Drops the table.
     * @param target
     * @param ifExist
     * @param dropForeignKeys
     * @param dropIndices
     */
    async dropTable(
        target: Table | string,
        ifExist?: boolean,
        dropForeignKeys: boolean = true,
        dropIndices: boolean = true,
    ): Promise<void> {