exposed-migration-jdbc/src/main/kotlin/org/jetbrains/exposed/v1/migration/jdbc/MigrationUtils.kt [102:131]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if (tables.isEmpty()) return emptyList() val statements = ArrayList() val existingTablesColumns = logTimeSpent(COLUMNS_LOG_MESSAGE, withLogs) { currentDialectMetadata.tableColumns(*tables) } val existingPrimaryKeys = logTimeSpent(PRIMARY_KEYS_LOG_MESSAGE, withLogs) { currentDialectMetadata.existingPrimaryKeys(*tables) } val tr = TransactionManager.current() val dbSupportsAlterTableWithAddColumn = tr.db.supportsAlterTableWithAddColumn val isIncorrectType = { columnMetadata: ColumnMetadata, column: Column<*> -> currentDialectMetadata.areEquivalentColumnTypes( columnMetadata.sqlType, columnMetadata.jdbcType, column.columnType.sqlType() ).not() } for (table in tables) { table.mapMissingColumnStatementsTo( statements, existingTablesColumns[table].orEmpty(), existingPrimaryKeys[table], dbSupportsAlterTableWithAddColumn, isIncorrectType ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - exposed-migration-r2dbc/src/main/kotlin/org/jetbrains/exposed/v1/migration/r2dbc/MigrationUtils.kt [105:134]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if (tables.isEmpty()) return emptyList() val statements = ArrayList() val existingTablesColumns = logTimeSpent(COLUMNS_LOG_MESSAGE, withLogs) { currentDialectMetadata.tableColumns(*tables) } val existingPrimaryKeys = logTimeSpent(PRIMARY_KEYS_LOG_MESSAGE, withLogs) { currentDialectMetadata.existingPrimaryKeys(*tables) } val tr = TransactionManager.current() val dbSupportsAlterTableWithAddColumn = tr.db.supportsAlterTableWithAddColumn val isIncorrectType = { columnMetadata: ColumnMetadata, column: Column<*> -> currentDialectMetadata.areEquivalentColumnTypes( columnMetadata.sqlType, columnMetadata.jdbcType, column.columnType.sqlType() ).not() } for (table in tables) { table.mapMissingColumnStatementsTo( statements, existingTablesColumns[table].orEmpty(), existingPrimaryKeys[table], dbSupportsAlterTableWithAddColumn, isIncorrectType ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -