-
Notifications
You must be signed in to change notification settings - Fork 65
Setup development environment
Hi, I am Rodel Dagumampan, maintainer of yuniql and welcome to yuniql contributor page. I am hoping you will have a light and easy start and I'll try to support you in getting started.
If this is your first time to participate in an open source initiative, you may look at issues labeled as first timer friendly issues. 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. This page best describe the process https://github.com/firstcontributions/first-contributions/blob/master/README.md#tutorials-using-other-tools.
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. |
- .NET Core 3.0+ SDK
- VS Code / Visual Studio 2019
- Docker Desktop, its much easier to run platform tests with containerized databases! :)
cd c:\temp
git clone {your-forked-repo-url-here}.git
cd c:\temp\yuniql\yuniql-cli
dotnet build
cd c:\temp\yuniql\yuniql-cli
dotnet publish -c release -r win-x64 /p:publishsinglefile=true /p:publishtrimmed=true
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\yuniql-cli\bin\release\netcoreapp3.0\win-x64\publish\
yuniql run -a -p "c:\temp\yuniql\samples\basic-sqlserver-sample"
yuniql info
Help us improve further please create an issue.