RenameColumn


@Repeatable
@Target(allowedTargets = [AnnotationTarget.CLASS])
@Retention(value = AnnotationRetention.BINARY)
@OptionalExpectation
public annotation RenameColumn


Repeatable annotation declaring the renamed columns in the AutoMigration.to version of an auto migration.

See also
AutoMigration

Summary

Nested types

@Target(allowedTargets = [AnnotationTarget.CLASS])
@Retention(value = AnnotationRetention.BINARY)
public annotation RenameColumn.Entries

Container annotation for the repeatable annotation RenameColumn.

Public constructors

RenameColumn(
    @NonNull String tableName,
    @NonNull String fromColumnName,
    @NonNull String toColumnName
)

Public methods

final @NonNull String

Name of the column in the AutoMigration.from version of the database.

final @NonNull String

Name of the table in the AutoMigration.from version of the database the renamed column is found in.

final @NonNull String

Name of the column in the AutoMigration.to version of the database.

Public constructors

RenameColumn

public RenameColumn(
    @NonNull String tableName,
    @NonNull String fromColumnName,
    @NonNull String toColumnName
)

Public methods

getFromColumnName

public final @NonNull String getFromColumnName()

Name of the column in the AutoMigration.from version of the database.

Returns
@NonNull String

Name of the column.

getTableName

public final @NonNull String getTableName()

Name of the table in the AutoMigration.from version of the database the renamed column is found in. The name in AutoMigration.from version is used in case the table was renamed in the AutoMigration.to version.

Returns
@NonNull String

Name of the table

getToColumnName

public final @NonNull String getToColumnName()

Name of the column in the AutoMigration.to version of the database.

Returns
@NonNull String

Name of the column.