From 9bf858b3bc9dd0c71a017e0e183c1fa08966262e Mon Sep 17 00:00:00 2001 From: Kun Deng Date: Tue, 18 Jun 2019 21:36:23 -0400 Subject: [PATCH] Update README.md #30 --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 8765ce2..edf5a4b 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,30 @@ The only requirement of the User is that the user should have full permissions t ### Migrations +Prior to starting the API, the Migrations must be applied. There are 6 tables with migrations being applied and thy are: +* Users +* Song +* Album +* Artist +* Year +* Genre + +There is a script for Linux systems to apply these migrations, it can be found in the [Scripts/Migrations/Linux](https://github.com/amazing-username/Icarus/blob/master/Scripts/Migrations/Linux/AddUpdate.sh) directory. Just merely execute: +```shell +scripts/Migrations/Linux/AddUpdate.sh +``` +Or you can manually add the migrations like so for each migration: +```shell +dotnet ef migrations Add [Migration] --context [Migration]Context +``` +Then update the migrations to the database like so*: +```shell +dotnet ef database update --context [Migration]Context +``` +From this point the database has been successfully configured. Metadata and song filesystem locations can be saved. + +* Will only need to execute this for UserContext and SongContext because the Song table has relational constraints with Album, Artist, Year, and Genre. + ## Contributing Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on the code of conduct, and the process for submitting pull requests to the project.