Back to Exposed

statementsRequiredToActualizeScheme

docs/api/exposed-r2dbc/org.jetbrains.exposed.v1.r2dbc/-schema-utils/statements-required-to-actualize-scheme.html

1.2.01.7 KB
Original Source

statementsRequiredToActualizeScheme

suspend fun statementsRequiredToActualizeScheme(vararg tables: Table, withLogs: Boolean = true): List<String>

Deprecated

This function will be removed in future releases. Please use MigrationUtils.statementsRequiredForDatabaseMigration() instead. MigrationUtils is accessible with a dependency on exposed-migration-r2dbc.

Replace with

kotlin
import org.jetbrains.exposed.v1.migration.r2dbc.MigrationUtils

Content copied to clipboard

kotlin
MigrationUtils.statementsRequiredForDatabaseMigration(*tables, withLogs = withLogs)

Content copied to clipboard

Returns the SQL statements that need to be executed to make the existing database schema compatible with the table objects defined using Exposed.

Note: Some databases, like SQLite , only support ALTER TABLE ADD COLUMN syntax in very restricted cases, which may cause unexpected behavior when adding some missing columns. For more information, refer to the relevant documentation. For SQLite, see ALTER TABLE restrictions.

By default, a description for each intermediate step, as well as its execution time, is logged at the INFO level. This can be disabled by setting withLogs to false.

Generated by Dokka © 2026 Copyright