Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add database migrations #125

Merged
merged 1 commit into from
Dec 19, 2023

Commits on Dec 18, 2023

  1. feat: Add database migrations

    This commit implements the database migrations.
    The database migrations bring more consistency to the user on the
    deployment as Archivista will handle changes on the SQL Schema.
    
    The implementation uses the Versioned Migrations
    (https://entgo.io/docs/versioned-migrations/).
    The main reason is that the ent Offline Mode
    (https://entgo.io/docs/migrate#offline-mode), which seems safer,
    is migrating to Versioned Migrations.
    
    The proposal strategy is to run the migrations during the
    container start and fail early in case of issues before the
    archivista application is done in the entry point.
    
    During the development, the developers can generate a new migration
    using the `make db-migrations` if there are changes in the schema
    files.
    
    This commit also implements an automatic check to avoid it for code
    review. It was added to checks (`db-migrations.yml`)
    
    Signed-off-by: Kairo de Araujo <kairo.araujo@testifysec.com>
    kairoaraujo committed Dec 18, 2023
    Configuration menu
    Copy the full SHA
    7073418 View commit details
    Browse the repository at this point in the history