docs(other): change contraint* to constraint*, correct indexes to indices, add yarn run db:migrations up to the readmes.

This commit is contained in:
elweyn 2023-02-28 13:02:29 +01:00
parent 1e0978620d
commit a3ac360889

View File

@ -81,8 +81,7 @@ More details about our GraphQL playground and how to use it with ocelot.social c
### Database Indices and Constraints ### Database Indices and Constraints
Database indices and constraints need to be created when the database and the Database indices and constraints need to be created and upgraded when the database and the backend are running:
backend is running:
{% tabs %} {% tabs %}
{% tab title="Docker" %} {% tab title="Docker" %}
@ -92,6 +91,11 @@ backend is running:
$ docker exec backend yarn run db:migrate init $ docker exec backend yarn run db:migrate init
``` ```
```bash
# in main folder with docker compose running
$ docker exec backend yarn run db:migrate up
```
{% endtab %} {% endtab %}
{% tab title="Without Docker" %} {% tab title="Without Docker" %}
@ -101,6 +105,11 @@ $ docker exec backend yarn run db:migrate init
yarn run db:migrate init yarn run db:migrate init
``` ```
```bash
# in backend/ with database running (In docker or local)
yarn run db:migrate up
```
{% endtab %} {% endtab %}
{% endtabs %} {% endtabs %}
@ -126,8 +135,10 @@ To reset the database run:
$ docker exec backend yarn run db:reset $ docker exec backend yarn run db:reset
# you could also wipe out your neo4j database and delete all volumes with: # you could also wipe out your neo4j database and delete all volumes with:
$ docker-compose down -v $ docker-compose down -v
# if container is not running, run this command to set up your database indeces and contstraints # if container is not running, run this command to set up your database indices and constraints
$ docker exec backend yarn run db:migrate init $ docker exec backend yarn run db:migrate init
# And then upgrade the indices and const
$ docker exec backend yarn run db:migrate up
``` ```
{% endtab %} {% endtab %}