From 50ca9008c6eb5909a6faedf62fa39b1a725d7e09 Mon Sep 17 00:00:00 2001 From: originalmk <30776840+originalmk@users.noreply.github.com> Date: Sat, 18 Mar 2023 09:03:08 +0100 Subject: [PATCH] Updated database instructions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a7f70fe..f15dd0b 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ To start this application you need to: - Install PostgreSQL DBMS - Setup some database and user with permissions to it - Create .env file in the main directory and fill it in with fields DB_USER, DB_PASS, DB_HOST, DB_PORT, DB_NAME and COOKIE_SECRET. In case of confusion you may check exemplary .env file saved as .env.example in the root directory of this repository. -2. Run both SQL scripts, which are located in the main directory. For app to be usable it is also recommended to insert some data to the database. +2. Run SQL migrations. To do that you should have knex installed globally (npm install knex -g) and then execute `knex migrate:latest` in the root directory. For app to be usable it is also recommended to insert some data to the database. - Note: Images should be added in media/images directory and image paths inserted into database should only contain part starting with images/ for example image may be uploaded at media/images/wozLEFT.webp and path in database should be images/wozLEFT.webp. 3. Run `npm install` in the main directory. 4. Run `npm install` in the client directory.