RenameColumn

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


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

See also
AutoMigration

Summary

Nested types

RenameColumn.Entries

Container annotation for the repeatable annotation RenameColumn.

Public fields

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(
    @NonNull String tableName,
    @NonNull String fromColumnName,
    @NonNull String toColumnName
)

Public fields

fromColumnName

public final @NonNull String fromColumnName

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

Returns
@NonNull String

Name of the column.

tableName

public final @NonNull String tableName

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

toColumnName

public final @NonNull String toColumnName

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

Returns
@NonNull String

Name of the column.

Public constructors

RenameColumn

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