{"id":26674680,"url":"https://github.com/aaronhallaert/fimi-rs","last_synced_at":"2025-04-12T07:22:50.353Z","repository":{"id":260951217,"uuid":"878454752","full_name":"aaronhallaert/fimi-rs","owner":"aaronhallaert","description":"File Migrations in Rust","archived":false,"fork":false,"pushed_at":"2024-11-03T20:21:43.000Z","size":22,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T02:41:17.924Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aaronhallaert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-25T12:27:46.000Z","updated_at":"2024-11-05T10:40:53.000Z","dependencies_parsed_at":"2024-11-03T20:32:24.898Z","dependency_job_id":"d0c4b3eb-ed09-4594-ba74-2fb6e1819612","html_url":"https://github.com/aaronhallaert/fimi-rs","commit_stats":null,"previous_names":["aaronhallaert/fimi-rs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronhallaert%2Ffimi-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronhallaert%2Ffimi-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronhallaert%2Ffimi-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronhallaert%2Ffimi-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aaronhallaert","download_url":"https://codeload.github.com/aaronhallaert/fimi-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248531279,"owners_count":21119734,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-26T02:38:46.162Z","updated_at":"2025-04-12T07:22:50.333Z","avatar_url":"https://github.com/aaronhallaert.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fimi-rs\n🚧 **Disclaimer: work in progress** 🚧\n\n**Fi**le **mi**grations made easy.\n\n## Description\n\nThe purpose of this repository is to offer a framework for configuration file migrations, akin to database migrations. `Fimi` is designed to be generic, handling various file content types (e.g., JSON, YAML) without concern.\nThis crate does not impose any restrictions on the migration itself; it is entirely up to the programmer implementing the migration. The migration code should be able to run independently of this framework.\n\nThe `fimi` crate delivers the core business logic for this framework, while `fimi_magic` includes procedural macros to support this logic.\n\n## Usage\n\nThe crate tracks executed migrations by keeping record in a manifest file.\n\n```rust\n/// see `fimi_example` to explore the complete example\n\nmod migrations {\n    /// the migration modules have a name convention of _*datetimeId*_*migration_name*\n    mod _20241021212814_init_migration {\n        use fimi::Migration;\n        pub struct InitMigration;\n\n        impl Migration for InitMigration {\n            fn up(\u0026self) -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n                // implement this\n                Ok(())\n            }\n\n            fn down(\u0026self) -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n                // implement this\n                Ok(())\n            }\n        }\n    }\n\n    use fimi_magic::migrations;\n\n    /// the arguments of this macro are modules\n    /// each module should have a public accessible struct with the same name as the migration \n    /// that implements the `fimi::Migration` trait.\n    /// (here: InitMigration \u0026 AddNewKeyToTestStructs)\n    migrations!(\n        _20241021212814_init_migration,\n        _20241022110124_add_new_key_to_test_structs\n    );\n}\n\nfn main() {\n    let executor = migrations::migrations();\n\n    executor.up();\n}\n```\n\n## Roadmap\n\n- [ ] interactive up/down with specified migrations (cargo-fimi?)\n    - needs dynamically loading of the migration modules when executing from cli (e.g. with `cargo fimi`) in the project where the migrations exist 🤔\n- [ ] scaffold migrations\n\n## Similar crates\n\n`fimi-rs` differs in the fact that the migrations are generic and are not tied to SQL / specific database connections.\n\n- [refinery](https://github.com/rust-db/refinery)\n- [dbmigrate](https://github.com/Keats/dbmigrate)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronhallaert%2Ffimi-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaronhallaert%2Ffimi-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronhallaert%2Ffimi-rs/lists"}