Skip to content

Apply DB repair migration via the serverpod CLI command #3120

Open

Description

@christerswahn

Problem to Solve

Today DB repair migrations are applied using the server runtime. But DB migrations, especially repair migrations, are often better to run as a deployment step that is handled separately from actual server start.

Proposal

Refactor the apply repair migrations logic in Serverpod server for reusability from the serverpod command, and add support for running it there.

(Issue #3118 is not strictly a prerequisite but would make using this command easier.)

Use Case

As a user, I'd like to be able to run it as an operation that stands alone from the server, via the serverpod CLI command.

Alternatives

An alternative could be to add a distinct subcommand to Serverpod server that effectively corresponds to the command line:

dart run bin/main.dart --role maintenance --apply-repair-migration

Additional context

Related to #3119

How experienced are you with this library?

Expert - Experienced and comfortable with using this library in complex projects

Are you interested in working on a PR for this?

  • I want to work on this

Activity

  1. added
    enhancement
    area: database
    area: cli
    area: deployment
    on Jan 13, 2025
  2. removed
    area: database
    area: deployment
    on Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: clienhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions