The DatabaseMigration annotation is used to mark manually created database migrations. When this annotation is applied to a class, it ensures that the migration is automatically included as a dependency for the database, making it part of the migration process.

Parameters:


Example Usage:

kotlin
@DatabaseMigration(version = 3)
class AddNewFieldsMigration {
    // Migration logic for version 3
}

In this example, the AddNewFieldsMigration class represents a manual migration for version 3 of the database. When the system detects this annotation, it automatically registers the migration as part of the database update process.


Key Benefits:

✅ Ensures manual migrations are automatically recognized and applied.

✅ Provides better version control for database schema updates.

✅ Allows flexible migration management by specifying the exact version.

By using DatabaseMigration, developers can integrate custom migrations seamlessly while maintaining database version consistency.