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

Add database migrations #4

Closed
wants to merge 1 commit into from
Closed

Add database migrations #4

wants to merge 1 commit into from

Conversation

kairoaraujo
Copy link
Owner

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)

@kairoaraujo kairoaraujo force-pushed the add_db_migrations branch 18 times, most recently from 3bfb205 to 102310e Compare December 14, 2023 17:00
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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant