spring-sqlx-migration-plugin

Crates.iospring-sqlx-migration-plugin
lib.rsspring-sqlx-migration-plugin
version0.2.3
sourcesrc
created_at2024-10-12 08:17:59.726743
updated_at2024-10-20 22:33:04.000149
descriptionA plugin to run SQLx migrations automatically within the SpringRS framework
homepagehttps://rustlang-es.org
repositoryhttps://github.com/Phosphorus-M/spring-sqlx-migration-plugin
max_upload_size
id1406299
size4,701
Phosphorus Moscu (Phosphorus-M)

documentation

README

Spring Sqlx Migration Plugin

crates.io

It's just a plugin to execute the migrations of Sqlx into SpringRS

Key Features:

  • Seamless integration with SpringRS
  • Automatically runs SQLx migrations on application startup
  • Supports various databases compatible with SQLx
  • Configurable and easy to use

Just add into the app.toml the initial config for this plugin:

[sqlx]
uri = "postgres://postgres:xudjf23adj213@127.0.0.1:5432"

[sqlx-migration]
migration_folder = "./migrations"

And into your main.rs

#[auto_config(WebConfigurator)] // auto config web router
#[tokio::main]
async fn main() {
    App::new()
        .add_plugin(SqlxPlugin) // Add plug-in
        .add_plugin(SqlxMigrationPlugin) // Add plug-in
        .add_plugin(WebPlugin)
        .run().await
}
Commit count: 8

cargo fmt