{"id":13415109,"url":"https://github.com/rdagumampan/yuniql","last_synced_at":"2025-05-15T11:08:28.365Z","repository":{"id":36475191,"uuid":"213106959","full_name":"rdagumampan/yuniql","owner":"rdagumampan","description":"Free and open source schema versioning and database migration made natively with .NET/6. NEW THIS MAY 2022! v1.3.15 released!","archived":false,"fork":false,"pushed_at":"2024-07-25T11:16:39.000Z","size":5210,"stargazers_count":419,"open_issues_count":112,"forks_count":64,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-14T19:58:44.769Z","etag":null,"topics":["amazon-rds","azure-sql-database","data-engineering","database-migrations","datawarehouse","dotnet-core","dotnet-tool","mariadb","mysql","oracle","postgresql","redshift","snowflake","sql","sqlserver","yuniql"],"latest_commit_sha":null,"homepage":"https://yuniql.io","language":"C#","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/rdagumampan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2019-10-06T04:07:53.000Z","updated_at":"2025-03-21T10:07:57.000Z","dependencies_parsed_at":"2024-09-02T18:21:37.533Z","dependency_job_id":"e9a48799-8666-4356-8ee8-519b74149690","html_url":"https://github.com/rdagumampan/yuniql","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdagumampan%2Fyuniql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdagumampan%2Fyuniql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdagumampan%2Fyuniql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdagumampan%2Fyuniql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rdagumampan","download_url":"https://codeload.github.com/rdagumampan/yuniql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254292333,"owners_count":22046479,"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":["amazon-rds","azure-sql-database","data-engineering","database-migrations","datawarehouse","dotnet-core","dotnet-tool","mariadb","mysql","oracle","postgresql","redshift","snowflake","sql","sqlserver","yuniql"],"created_at":"2024-07-30T21:00:43.451Z","updated_at":"2025-05-15T11:08:28.345Z","avatar_url":"https://github.com/rdagumampan.png","language":"C#","funding_links":[],"categories":["C# #","Deployment","部署","Schema"],"sub_categories":["Changes"],"readme":"# yuniql ![yuniql-build-status](https://img.shields.io/appveyor/ci/rdagumampan/yuniql?style=flat-square\u0026logo=appveyor) [![AppVeyor tests (branch)](https://img.shields.io/appveyor/tests/rdagumampan/yuniql?style=flat-square\u0026logo=appveyor)](https://ci.appveyor.com/project/rdagumampan/yuniql/build/tests) [![Gitter](https://img.shields.io/gitter/room/yuniql/yuniql?style=flat-square\u0026logo=gitter\u0026color=orange)](https://gitter.im/yuniql/yuniql) [![Download latest build](https://img.shields.io/badge/Download-win--x64-green?style=flat-square\u0026logo=windows)](https://github.com/rdagumampan/yuniql/releases/download/latest/yuniql-cli-win-x64-latest.zip) [![Download latest build](https://img.shields.io/badge/Download-docker--images-green?style=flat-square\u0026logo=docker)](https://hub.docker.com/r/yuniql/yuniql)\n\n**** HELP DATA DEVELOPERS DISCOVER YUNIQL, PLEASE STAR THIS REPO. ITS FREE. :) THANKS! ****\n\n**yuniql** (yuu-nee-kel). Free and open source schema versioning and database migration engine made natively with .NET Core. Use plain SQL scripts, bulk import CSV, integrate CI/CD pipelines, zero runtime dependencies and works with windows and linux. Supports SqlServer, PostgreSql, MySql, MariaDB, Snowflake, Redshift and Oracle*.\n\n\u003c!--\n\u003cimg align=\"center\" src=\"https://yuniql.io/images/evodb-01.png\" width=\"700\"\u003e\n\u003eInspired by [Evolutionary Database Design](https://www.martinfowler.com/articles/evodb.html) by Martin Fowler and Pramod Sadalage.\n--\u003e\n\n\u003cimg align=\"center\" src=\"https://yuniql.io/images/screen-gif-01-gh.gif\" width=\"100%\"\u003e\n\n## Working with CLI\n\nManage local db versions and run database migrations from your CLI tool. Perform local migration run or verify with uncommitted runs to test your scripts. [Download latest release here](https://github.com/rdagumampan/yuniql/releases/download/latest/yuniql-cli-win-x64-latest.zip). Install yuniql CLI with Chocolatey or use alternative ways listed here https://yuniql.io/docs/install-yuniql\n\n```console\ndotnet tool install -g yuniql.cli\nchoco install yuniql\ndocker run --rm yuniql/cli:linux-x64-latest run --platform sqlserver --help\n```\n\n```powershell\n# powershell\nInvoke-WebRequest -Uri https://github.com/rdagumampan/yuniql/releases/download/latest/yuniql-cli-win-x64-latest.zip -OutFile  \"c:\\temp\\yuniql-win-x64-latest.zip\"\nExpand-Archive \"c:\\temp\\yuniql-win-x64-latest.zip\" -DestinationPath \"c:\\temp\\yuniql-cli-latest\"\ncd c:\\temp\\yuniql-cli-latest\n.\\yuniql.exe run --platform sqlserver --help\n```\n\n### Run migrations for SQL Server\n\n```console\ndocker run -d -e \"ACCEPT_EULA=Y\" -e \"MSSQL_SA_PASSWORD=P@ssw0rd!\" -p 1400:1433 -d mcr.microsoft.com/mssql/server:2017-latest\nSETX YUNIQL_CONNECTION_STRING \"Server=localhost,1400;Database=yuniqldb;User Id=SA;Password=P@ssw0rd!;TrustServerCertificate=True\"\nSETX YUNIQL_WORKSPACE \"c:\\temp\\yuniql-cli\\samples\\basic-sqlserver-sample\"\n```\n\n```console\ngit clone https://github.com/rdagumampan/yuniql.git c:\\temp\\yuniql-cli\ncd c:\\temp\\yuniql-cli\\samples\\basic-sqlserver-sample\n\nyuniql run -a --platform sqlserver\nyuniql list --platform sqlserver\n\nRunning yuniql v1.0.1 for windows-x64\nCopyright 2019 (C) Rodel E. Dagumampan. Apache License v2.0\nVisit https://yuniql.io for documentation \u0026 more samples\n\n+---------------+----------------------+------------+---------------+----------------------+--------------+\n| SchemaVersion | AppliedOnUtc         | Status     | AppliedByUser | AppliedByTool        | Duration     |\n+---------------+----------------------+------------+---------------+----------------------+--------------+\n| v0.00         | 2021-02-04 06:06:46Z | Successful | sa            | yuniql-cli v1.1.55.0 | 164 ms / 0 s |\n+---------------+----------------------+------------+---------------+----------------------+--------------+\n```\n\n### Supported databases and platform tests\n\nAmazon Aurora, Azure Synapse and Alibaba Aspara are being evaluated/developed/tested. For running migration from docker container, [see instructions here](https://yuniql.io/docs/migrate-via-docker-container/).\n\n|Platforms|Build Status|Description|Cloud Infrastructure|Documentation|\n|---|---|---|---|---|\n|sqlserver|[![yuniql-build-status](https://img.shields.io/appveyor/tests/rdagumampan/yuniql-14iom?style=flat-square\u0026logo=appveyor)](https://ci.appveyor.com/project/rdagumampan/yuniql-14iom/build/tests)|Sql Server 2017 and later |Azure, GCP, AWS|[Get started](https://yuniql.io/docs/get-started-sqlserver/)|\n|postgresql|[![yuniql-build-status](https://img.shields.io/appveyor/tests/rdagumampan/yuniql-w1l3j?style=flat-square\u0026logo=appveyor)](https://ci.appveyor.com/project/rdagumampan/yuniql-w1l3j/build/tests)|PostgreSql v9.6 and later |Azure, GCP, AWS|[Get started](https://yuniql.io/docs/get-started-postgresql/)|\n|mysql|[![yuniql-build-status](https://img.shields.io/appveyor/tests/rdagumampan/yuniql-xk6jt?style=flat-square\u0026logo=appveyor)](https://ci.appveyor.com/project/rdagumampan/yuniql-xk6jt/build/tests)|MySql v5.7 and later |Azure, GCP, AWS|[Get started](https://yuniql.io/docs/get-started-mysql/)|\n|mariadb|[![yuniql-build-status](https://img.shields.io/appveyor/tests/rdagumampan/yuniql-9v8am?style=flat-square\u0026logo=appveyor)](https://ci.appveyor.com/project/rdagumampan/yuniql-9v8am/build/tests)|MariaDb v10.2 and later |Azure, GCP, AWS|[Get started](https://yuniql.io/docs/get-started-mysql/)|\n|snowflake|[![yuniql-build-status](https://img.shields.io/appveyor/tests/rdagumampan/yuniql-16r99?style=flat-square\u0026logo=appveyor)](https://ci.appveyor.com/project/rdagumampan/yuniql-16r99/build/tests)|Last verified  12.2021 |GCP|[Get started](https://yuniql.io/docs/get-started-snowflake/)|\n|redshift|[![yuniql-build-status](https://img.shields.io/appveyor/tests/rdagumampan/yuniql-0shgd?style=flat-square\u0026logo=appveyor)](https://ci.appveyor.com/project/rdagumampan/yuniql-0shgd/build/tests)|Last verified  12.2021|AWS|[Get started](https://yuniql.io/docs/get-started-resdshift/)|\n|oracle|[![yuniql-build-status](https://img.shields.io/appveyor/tests/rdagumampan/yuniql-r1lu4?style=flat-square\u0026logo=appveyor)](https://ci.appveyor.com/project/rdagumampan/yuniql-r1lu4/build/tests)|Preview build. Oracle 11g and later|Oracle Cloud|[Get started](https://yuniql.io/docs/get-started-oracle/)|\n|sap hana|Analysis phase|Expected Q1 2022|Azure||\n|synapse|Analysis phase|Expected Q2 2022|Azure||\n|aurora|Ideation phase|No release date yet|AWS||\n|asparadb|Ideation phase|No release date yet|Alibaba||\n\n\u003e NOTE: Supported cloud platforms are based on limited testing and community feedbacks where users indicated the platform they were attempting to run against. yuniql primarily uses Amazon RDS as cloud provider for non-vendor specific platforms.\n\n|Distributions|Build Status|Description|\n|---|---|---|\n|Docker image linux-x64|![yuniql-build-status](https://img.shields.io/appveyor/ci/rdagumampan/yuniql-ee37o?style=flat-square\u0026logo=appveyor)|`docker pull yuniql/yuniql:linux-x64-latest`|\n|Docker imiage win-x64|![yuniql-build-status](https://img.shields.io/appveyor/ci/rdagumampan/yuniql-uakd6?style=flat-square\u0026logo=appveyor)|`docker pull yuniql/yuniql:win-x64-latest`|\n\n### Run migrations for PostgreSql, MySql and others\n\n```console\ndocker run -d -e POSTGRES_USER=sa -e POSTGRES_PASSWORD=P@ssw0rd! -e POSTGRES_DB=yuniqldb -p 5432:5432 postgres\nSETX YUNIQL_CONNECTION_STRING \"Host=localhost;Port=5432;Username=sa;Password=P@ssw0rd!;Database=yuniqldb\"\nSETX YUNIQL_WORKSPACE \"c:\\temp\\yuniql-cli\\samples\\basic-postgresql-sample\"\n```\n\n```console\ngit clone https://github.com/rdagumampan/yuniql.git c:\\temp\\yuniql-cli\ncd c:\\temp\\yuniql-cli\\samples\\basic-postgresql-sample\n\nyuniql run -a --platform postgresql\nyuniql list --platform postgresql\n```\n\n## Working with Azure DevOps Pipelines Tasks\nRun your database migration from Azure DevOps Pipelines. The tasks downloads package and cache it for later execution just like how `Use .NET Core` or `Use Node` tasks works. Find Yuniql on [Azure DevOps MarketPlace](https://marketplace.visualstudio.com/items?itemName=rdagumampan.yuniql-azdevops-extensions). Developer guide is available here https://yuniql.io/docs/migrate-via-azure-devops-pipelines.\n\n\u003cimg align=\"center\" src=\"https://rdagumampan.gallerycdn.vsassets.io/extensions/rdagumampan/yuniql-azdevops-extensions/1.187.0/1593377792822/images/yuniql-run.png\"\u003e\n\n## Working with Docker Container\nRun your database migration thru a Docker container. This is specially helpful on Linux environments and CI/CD pipelines running on Linux Agents as it facilitates your migration without having to worry any local installations or runtime dependencies. Developer guide is available here https://yuniql.io/docs/migrate-via-docker-container.\n\n```console\ngit clone https://github.com/rdagumampan/yuniql.git c:\\temp\\yuniql-docker\ncd c:\\temp\\yuniql-docker\\samples\\basic-sqlserver-sample\n\ndocker build -t sqlserver-example .\ndocker run sqlserver-example -c \"\u003cyour-connection-string\u003e\" -a --platform sqlserver\n```\n\n## Working with ASP.NET Core\nRun your database migration when your ASP.NET Core host service starts up. This ensures that database is always at latest compatible state before operating the service. Applies to Worker and WebApp projects. Developer guide is available here https://yuniql.io/docs/migrate-via-aspnetcore-application.\n\n```console\ndotnet add package Yuniql.AspNetCore\n```\n\n```csharp\nusing Yuniql.AspNetCore;\n...\n...\n\n//1. deploy new sql server on docker or use existing instance\n//$ docker run -dit --name yuniql-sqlserver  -e \"ACCEPT_EULA=Y\" -e \"MSSQL_SA_PASSWORD=P@ssw0rd!\" -p 1400:1433 -d mcr.microsoft.com/mssql/server:2017-latest\n\n//2. create custom trace message sinks, this can be your own logger framework\nvar traceService = new ConsoleTraceService { IsDebugEnabled = true };\n\n//3. run migrations\napp.UseYuniql(traceService, new Yuniql.AspNetCore.Configuration\n{\n\tPlatform = SUPPORTED_DATABASES.SQLSERVER,\n\tWorkspace = Path.Combine(Environment.CurrentDirectory, \"_db\"),\n\tConnectionString = \"Server=localhost,1400;Database=helloyuniql;User Id=SA;Password=P@ssw0rd!;TrustServerCertificate=True\",\n\tIsAutoCreateDatabase = true, IsDebug = true\n});\n```\n\n## Working with .NET Core Console Application\nRun your database migration when Console App starts. Developer guide is available here https://yuniql.io/docs/migrate-via-netcore-console-application.\n \n```console\ndotnet add package Yuniql.Core\n```\n\n```csharp\nusing Yuniql.Core;\n...\n...\n\nstatic void Main(string[] args)\n{\n\t//1. deploy new sql server on docker or use existing instance\n\t//$ docker run -dit -e \"ACCEPT_EULA=Y\" -e \"MSSQL_SA_PASSWORD=P@ssw0rd!\" -p 1400:1433 -d mcr.microsoft.com/mssql/server:2017-latest\n\n\t//2. create custom trace message sinks, this can be your own logger framework\n\tvar traceService = new ConsoleTraceService { IsDebugEnabled = true };\n\n\t//3. configure your migration run\n\tvar configuration = Configuration.Instance;\n\tconfiguration.Platform = SUPPORTED_DATABASES.SQLSERVER;\n\tconfiguration.Workspace = Path.Combine(Environment.CurrentDirectory, \"_db\");\n\tconfiguration.ConnectionString = \"Server=localhost,1400;Database=helloyuniql;User Id=SA;Password=P@ssw0rd!;TrustServerCertificate=True\";\n\tconfiguration.IsAutoCreateDatabase = true;\n\n\t//4. run migrations\n\tvar migrationServiceFactory = new MigrationServiceFactory(traceService);\n\tvar migrationService = migrationServiceFactory.Create();\n\tmigrationService.Run();\n```\n\n## Advanced use cases\n\n* [How to bulk import CSV master data](https://yuniql.io/docs/bulk-import-csv-master-data/)\n* [How to replace tokens in script files](https://yuniql.io/docs/token-replacement/)\n* [How to run environment-aware migrations](https://yuniql.io/docs/environment-aware-scripts/)\n* [How to baseline your database](https://yuniql.io/docs/baseline-database/)\n* [How yuniql works](https://yuniql.io/docs/how-yuniql-works/)\n\n## Contributing \u0026 asking for help\n\nPlease submit ideas for improvement or report a bug by [creating an issue](https://github.com/rdagumampan/yuniql/issues/new). \u003cbr\u003e\nAlternatively, tag [#yuniql](https://twitter.com/) on Twitter or drop me a message rdagumampanATgmail.com.\n\nIf this is your first time to participate in an open source initiative, you may look at issues labeled as [first timer friendly issues](https://github.com/rdagumampan/yuniql/issues?q=is%3Aissue+is%3Aopen+label%3Afirst-timers-friendly). If you found an interesting case, you can fork this repository, clone to your dev machine, create a local branch, and make Pull Requests (PR) so I can review and merge your changes.\n\nTo prepare your dev machine, please visit https://github.com/rdagumampan/yuniql/wiki/Setup-development-environment\n\n## License\n\nCopyright (C) 2019 Rodel E. Dagumampan\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n\n## Credits\n\nYuniql relies on many open-source projects and we would like to thanks:\n- [CommandlineParser](https://github.com/commandlineparser) for CLI commands\n- [CsvTextFieldParser](https://github.com/22222/CsvTextFieldParser) for CSV file parsing\n- [Npgsql](https://github.com/npgsql/npgsql) for PostgreSql drivers\n- [Shouldly](https://github.com/shouldly) for unit tests\n- [Moq](https://github.com/moq) for unit test mocks\n- [Evolutionary database design](https://www.martinfowler.com/articles/evodb.html) by Martin Fowler and Pramod Sadalage\n- Microsoft, Oracle, for everything in dotnetcore seems open source now :)\n- All the free devops tools! [GitHub](http://github.com), [AppVeyor](https://www.appveyor.com), [Docker](https://www.docker.com/), [Shields.io](https://shields.io/) ++\n\n## Maintainers\n\n[//]: contributor-faces\n\n\u003ca href=\"https://github.com/rdagumampan\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/5895952?v=3\" title=\"rdagumampan\" width=\"80\" height=\"80\"\u003e\u003c/a\u003e\n\n[//]: contributor-faces\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdagumampan%2Fyuniql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frdagumampan%2Fyuniql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdagumampan%2Fyuniql/lists"}