Add efcore as project-specific tool; update documentation

This commit is contained in:
Noi 2024-04-28 19:12:34 -07:00
parent e6e335b5dc
commit 2263ed2934
2 changed files with 15 additions and 3 deletions

12
.config/dotnet-tools.json Normal file
View file

@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "8.0.4",
"commands": [
"dotnet-ef"
]
}
}
}

View file

@ -9,9 +9,8 @@ An automated way to recognize birthdays in your community!
#### Running your own instance #### Running your own instance
You need: You need:
* .NET 6 (https://dotnet.microsoft.com/en-us/) * .NET 8 (https://dotnet.microsoft.com/en-us/)
* PostgreSQL (https://www.postgresql.org/) * PostgreSQL (https://www.postgresql.org/)
* EF Core tools (https://learn.microsoft.com/en-us/ef/core/get-started/overview/install#get-the-entity-framework-core-tools)
* A Discord bot token (https://discord.com/developers/applications) * A Discord bot token (https://discord.com/developers/applications)
Get your bot token and set up your database user and schema, then create a JSON file containing the following: Get your bot token and set up your database user and schema, then create a JSON file containing the following:
@ -28,10 +27,11 @@ Get your bot token and set up your database user and schema, then create a JSON
Then run the following commands: Then run the following commands:
```sh ```sh
$ dotnet restore $ dotnet restore
$ dotnet tool restore
$ dotnet ef database update -- -c path/to/config.json $ dotnet ef database update -- -c path/to/config.json
``` ```
And finally, to run the bot: And finally, to run the bot:
``` ```sh
$ dotnet run -c Release -- -c path/to/config.json $ dotnet run -c Release -- -c path/to/config.json
``` ```