{"id":13715707,"url":"https://github.com/AngelMunoz/Migrondi","last_synced_at":"2025-05-07T05:31:33.870Z","repository":{"id":47771215,"uuid":"253136688","full_name":"AngelMunoz/Migrondi","owner":"AngelMunoz","description":"A Super simple SQL Migrations Tool for SQLite, PostgreSQL, MySQL and SQL Server","archived":false,"fork":false,"pushed_at":"2024-10-31T23:22:24.000Z","size":396,"stargazers_count":81,"open_issues_count":5,"forks_count":7,"subscribers_count":3,"default_branch":"vnext","last_synced_at":"2025-05-04T13:07:53.771Z","etag":null,"topics":["console","database","dotnet","fsharp","mssql","mysql","postgresql","sql-migrations","sqlite"],"latest_commit_sha":null,"homepage":"https://angelmunoz.github.io/Migrondi/","language":"F#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AngelMunoz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"daniel_tuna","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-04-05T02:01:41.000Z","updated_at":"2025-01-04T09:09:35.000Z","dependencies_parsed_at":"2023-10-11T18:53:59.838Z","dependency_job_id":"282e13e4-ced1-4561-a148-95947e9d477e","html_url":"https://github.com/AngelMunoz/Migrondi","commit_stats":{"total_commits":239,"total_committers":4,"mean_commits":59.75,"dds":0.07949790794979084,"last_synced_commit":"cfdbe301f50cfb7d2bb334a6f8553f6374ed23af"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngelMunoz%2FMigrondi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngelMunoz%2FMigrondi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngelMunoz%2FMigrondi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngelMunoz%2FMigrondi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AngelMunoz","download_url":"https://codeload.github.com/AngelMunoz/Migrondi/tar.gz/refs/heads/vnext","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252822995,"owners_count":21809700,"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":["console","database","dotnet","fsharp","mssql","mysql","postgresql","sql-migrations","sqlite"],"created_at":"2024-08-03T00:01:02.418Z","updated_at":"2025-05-07T05:31:33.618Z","avatar_url":"https://github.com/AngelMunoz.png","language":"F#","funding_links":["https://ko-fi.com/daniel_tuna"],"categories":[],"sub_categories":[],"readme":"![.NET Core](https://github.com/AngelMunoz/Migrondi/workflows/.NET%20Core/badge.svg?branch=master)\n\n\u003e Currently Working on the next version to also add better support for the VSCode Extension!\n\n# Migrondi\n\nMigrondi is a SQL Migrations tool designed to be simple and execute simple migrations. Write SQL and execute SQL against your database.\n\n\u003e No need to install it, use it from [VSCode](https://marketplace.visualstudio.com/items?itemName=tunaxor-apps.migrondi-vscode)! https://github.com/AngelMunoz/migrondi-vscode\n\nMigrondi Runs on `Linux-x64`, `Linux-arm64`, `Windows-x64`, and `MacOS-x64` (intel based)\n## Install\n\n### For Non .NET users\n\nGrab the binary from the releases page or build from source and put it on your `PATH`, that way the command is available globally e.g.\n\n```bash\n# you can put this at the end of your ~/.bashrc\n# $HOME/Apps/migrondi is a directory where you have downloaded your \"Migrondi\" binary\nexport MIGRONDI_HOME=\"$HOME/Apps/migrondi\"\nexport PATH=\"$PATH:$MIGRONDI_HOME\"\n```\n\n### For .NET users\n\nyou can now install this as a global/local tool as well\n\n```\ndotnet tool install --global Migrondi\n```\n\n## Usage\n\n### Init\n\nIf you are starting from scratch you can run the init command to create the migrondi files and directories needed for the rest of the commands to work properly\n\n```\n~/Migrondi $ ./Migrondi init\nCreated /home/x/Migrondi/migrondi.json and /home/x/Migrondi/migrations\n~/Migrondi $\n```\n\n```\nPS C:\\Users\\x\\Migrondi\u003e ./Migrondi.exe init\nCreated C:\\Users\\x\\Migrondi\\migrondi.json and C:\\Users\\x\\Migrondi\\migrations\\\nPS C:\\Users\\x\\Migrondi\u003e\n```\n\nThen you can adapt the configuration as needed\n\n### Config File\n\nto use this tool you need to supply a JSON configuration file (the name must be `migrondi.json`)\n\n```json\n{\n  \"connection\": \"Data Source=Migrondi.db\",\n  \"migrationsDir\": \"./migrations/\",\n  \"driver\": \"sqlite\"\n}\n```\n\n- connection\n\n  This is a IDbConnection compatible connection string (you can find examples in the follwing links)\n\n  - [SqlServer](https://www.connectionstrings.com/sql-server/)\n  - [SQLite](https://www.connectionstrings.com/sqlite/)\n  - [MySQL](https://www.connectionstrings.com/mysql/)\n  - [PostgreSQL](https://www.connectionstrings.com/postgresql/)\n\n- migrationsDir\n\n  this is an absolute or relative path to where the migrations will be stored **_Note_**: please include the trailing slash to prevent writing on the directory above of the one you pointed to. (if you use the init command, this is created for you)\n\n- driver\n\n  any of the following \"mssql\" \"sqlite\" \"mysql\" \"postgres\"\n\n```\nMigrondi 0.5.0\nCopyright (C) 2020 Angel D. Munoz\n\n  init       Creates basic files and directories to start using migrondi.\n\n  new        Creates a new Migration file.\n\n  up         Runs the migrations against the database.\n\n  down       Rolls back migrations from the database.\n\n  list       List the amount of migrations in the database.\n\n  help       Display more information on a specific command.\n\n  version    Display version information.\n```\n\n### New\n\nTo create a new migration file run `Migrondi.exe new -n CreateTodosTable` where `CreateTodosTable` is the name of your migration, you can replace that name with your migration name it will create a new file with a name like this:\n`SampleMigration_1586550686936.sql` with the following contents\n\n```sql\n-- ---------- MIGRONDI:UP:1586550686936 --------------\n-- Write your Up migrations here\n\n-- ---------- MIGRONDI:DOWN:1586550686936 --------------\n-- Write how to revert the migration here\n```\n\nPlease do not remove the `MIGRONDI:UP:TIMESTAMP` and `MIGRONDI:DOWN:TIMESTAMP` comments these are used to differentiate what to run when you run the `up` or `down` commands.\n\n### Up\n\nTo run your migrations against your database use the \"up\" command `Migrondi.exe up` you can use `-t \u003cnumber\u003e` to specify how many migrations you want to run\n\n### Down\n\nTo rollback your migrations from your database use the \"down\" command `Migrondi.exe down` you can use `-t \u003cnumber\u003e` to specify how many migrations you want to roll back\n\n### List\n\nIf you want to list migrations you can use the command \"list\" `Migrondi.exe list` with the following flag combinations\n\n- `Migrondi.exe list --last true`\n- `Migrondi.exe list --all true --missing true`\n- `Migrondi.exe list --all true --missing false`\n\nthese will give you these outputs\n\n- Last migration in the database\n- All migrations that are missing\n- All migrations present in the database\n\n## Build\n\nUse the build.fsx (`dotnet fsi build.fsx`) script or clone and run\n\n```\ndotnet publish -c Release -r \u003cRID\u003e --self-contained true -p:PublishSingleFile=true -o dist\n```\n\nreplace RID and the angle brackets with any of the following\n\n- [Windows RIDs](https://docs.microsoft.com/en-us/dotnet/core/rid-catalog#windows-rids)\n- [Linux RIDs](https://docs.microsoft.com/en-us/dotnet/core/rid-catalog#linux-rids)\n- [MacOS RIDs](https://docs.microsoft.com/en-us/dotnet/core/rid-catalog#macos-rids)\n\nthis should give you a binary file in the `dist` directory, after that put it wherever you want and add it to your path and you can start using it\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAngelMunoz%2FMigrondi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAngelMunoz%2FMigrondi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAngelMunoz%2FMigrondi/lists"}