How to recreate the Postgres database
Jesse uses database migrations to make sure changes are reflected in your database on new versions. However, sometimes these changes are not reflected in your database as intended.
The safest way is to create and use a fresh database and user.
First, delete existing candle caches (if any) from the root of your Jesse project run:
rm storage/temp/*.pickle
Docker installations
If you're using Jesse via docker, first go to the docker
directory in your project:
cd docker
First, stop the running containers:
docker-compose stop
Now check to see if a postgres-data
directory exists. If so, remove it:
rm -rf postgres-data
If you don't see a postgres-data
directory, that's probably because it's stored in a different path on your machine. Recently, I updated the docker-compose.yml
file to use a relative path instead to make it easier to use. To update, copy the content of the latest docker-compose.yml
file from Github to your project's /docker/docker-compose.yml
file.
Now you can start the containers again and docker should create a new database:
docker-compose up -d
Native installations
The easiest way is to just create a new database and user and then update .env
file in your project to use the new values.
For example, instead of the default jesse_db
and jesse_user
values, you can use jesse_db2
and jesse_user2
:
You can find the database commands on this page of the documentation for all supported operating systems.