Skip to content

Improve schema migration storage #180

@milosmns

Description

@milosmns

Provide a brief summary of the planned work

Migrations of database schemas are individually stored in the database; we can optimize that to store only the last migrated schema version.

Detailed overview

Each schema is a row in the schemas database, and more rows are added when schemas are added. Ultimately, we will always run all migrations (until the latest schema is set), but all schemas will have a row set. Of course, this is a minor issue for the database, but it's an unnecessary process and complex schema management that only needs to exist today.

We can simplify it by only storing the latest version of the schema while running all previous migrations in a sequence before the last number is reached.

Hint/location:

com.appifyhub.monolith.features.init.storage.SchemaDao
com.appifyhub.monolith.features.init.repository.SchemaRepository
com.appifyhub.monolith.features.init.domain.SchemaInitializer

List the acceptance criteria

  • Schema storage is optimized only to hold information about the latest schema
  • Tests are updated to reflect these changes, and passing

Include any additional notes (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNew feature or requestPlannedPlanned and roadmapped work

    Type

    No type

    Projects

    Status

    Ready

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions