Skip to content

szczepienia-pw/backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Szczepienia.pw backend

Setting up the environment

  • Create new, empty database called "io" in MariaDB. If database already exists, removed previously created tables!
  • Run migration to create tables and seed sample values.
  • Import Postman collection (app/Postman/IO.postman_collection.json) and add global variable "IOHostURL" with value "https://localhost:7229".

Fix for local database

Currently our project doesn't support automagic detection of local and remote environment. For the purposes of CI, appsettings.json contains the path to the VPS database, which should be change to local one.

In app/appsettings.json replace "MySQLConnection": "server=mariadb;uid=root;pwd=;database=io" with "MySQLConnection": "server=localhost;uid=root;pwd=;database=io"

Database workflow cheatsheet

Path to package console

Visual Studio 2022 / Tools / NuGet Package Manager / Package Manager Console

Generating migration

After introducing change in backend models, you have to prepare migration: add-migration [version]

Updating database

To propagate the changes to database, you have to update it: update-database

Reverting changes

It's also possible to revert changes in database by providing previous version of migration: update-database [version-1]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages