MigrationEntityCE annotation is used with an entity class to automatically generate a migration when the database schema changes. This allows seamless schema evolution without requiring manual migration definitions.

Parameters:


Example Usage:


@MigrationEntityCE(migrationVersion = 4)
@Entity
data class User(
    @PrimaryKey val id: Int,
    val name: String,
    val email: String
)

In this example, the User entity is marked with MigrationEntityCE, indicating that it belongs to migration version 4. If the structure of User changes in future versions, the system will automatically generate the necessary migration.


Key Benefits:

✅ Eliminates the need for manual migration definitions.

✅ Ensures database schema updates are tracked and applied correctly.

✅ Simplifies the migration process while maintaining data integrity.

By using MigrationEntityCE, developers can focus on defining their entity structures without worrying about handling migrations manually.