Skip to content

Setup development environment

Rodel E. Dagumampan edited this page May 2, 2020 · 31 revisions

Yuniql solution can be built from main solution file Yuniql.sln. When running platform tests, you need to set required environment variables first. The table describe the purpose of each directory.

Solution/Directory Description
Yuniql.sln The main solution to build Yuniql CLI with default support for SqlServer. The unit tests and extensibility interfaces for building plugins are here.
yuniql-extensibility Interfaces to implement to support a database platform. Yuniql.SqlServer, Yuniql.PostgreSql, and Yuniql.MySql all implements the interface.
yuniql-core Holds main execution engine for running database migrations.
yuniql-platforms Specific DB platform implementation are placed here. Each directory is compiled as nuget package.
yuniql-tests Contains unit tests and platform verification test projects.
yuniql-cli When built, produces the compatible yuniql.exe file or publishes .DLLs for Linux clients.
Solution/Directory Description
yuniql-aspnetcore Produces Yuniql.AspNetCore nuget package for use in .NET Core WebApp, WebApi and Worker projects.
yuniql-distribution Holds distribution of yuniql via Chocolatey or other distribution channels.
yuniql-azure-pipelines Products packages for Azure DevOps Marketplace.

1. Install prerequisites

2. Fork repository in GitHub

cd c:\temp
git clone {your-forked-repo-url-here}.git

3. Build the code

cd c:\temp\yuniql\yuniql-cli
dotnet build

4. Publish as an executable yuniql.exe

cd c:\temp\yuniql\yuniql-cli
dotnet publish -c release -r win-x64 /p:publishsinglefile=true /p:publishtrimmed=true

5. Run with CLI

Prepare your target database, here we use SqlServer on Docker

docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=P@ssw0rd!" -p 1400:1433 -d mcr.microsoft.com/mssql/server:2017-latest
SETX YUNIQL_CONNECTION_STRING "Server=localhost,1400;Database=helloyuniql;User Id=SA;Password=P@ssw0rd!"

Run migrations

cd c:\temp\yuniql\samples\basic-sqlserver-sample
yuniql run -a
yuniql info

6. Run platform tests

https://github.com/rdagumampan/yuniql/blob/master/yuniql-tests/platform-tests/README.md

Found bugs?

Help us improve further please create an issue.