migration.md - adjust db-creation docs for psql 15

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2023-02-16 16:44:35 +01:00
parent 43ef6cb056
commit e9497634b6

View file

@ -36,8 +36,10 @@ The procedure for migrating the files and the database works like this:
export PG_PASSWORD="my-temporary-password"
export PG_DATABASE="nextcloud_db"
sudo -u postgres psql <<END
CREATE USER $PG_USER WITH PASSWORD '$PG_PASSWORD';
CREATE USER $PG_USER WITH PASSWORD '$PG_PASSWORD' CREATEDB;
CREATE DATABASE $PG_DATABASE WITH OWNER $PG_USER TEMPLATE template0 ENCODING 'UTF8';
GRANT ALL PRIVILEGES ON DATABASE $PG_DATABASE TO $PG_USER;
GRANT ALL PRIVILEGES ON SCHEMA public TO $PG_USER;
END
```
1. Run the following command to start the conversion: