mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-22 09:49:20 -07:00
fix: changing PostgreSQL commands that create the user and database.
@@ -28,15 +28,13 @@ A complete list of codes can be found on [Wikipedia page for percent encoding](h
|
||||
|
||||
An easy way of migrating from SQLite to PostgreSQL or to MySQL exists, but please, note that you **are using this at your own risk and you are strongly advised to backup your installation and data!**. This is **unsupported** and has not been robustly tested.
|
||||
|
||||
1. Create an new (empty) database for vaultwarden:
|
||||
```sql
|
||||
CREATE DATABASE vaultwarden;
|
||||
```
|
||||
2. Create a new database user and grant rights to database:
|
||||
1. Create a new database user:
|
||||
```sql
|
||||
CREATE USER vaultwarden WITH ENCRYPTED PASSWORD 'yourpassword';
|
||||
GRANT CONNECT ON DATABASE vaultwarden TO vaultwarden;
|
||||
ALTER SCHEMA public OWNER TO vaultwarden;
|
||||
```
|
||||
2. Create a new (empty) database for vaultwarden, setting the user as the database owner:
|
||||
```sql
|
||||
CREATE DATABASE vaultwarden OWNER vaultwarden;
|
||||
```
|
||||
3. Configure vaultwarden and start it, so diesel can run migrations and set up the schema properly. Do not do anything else.
|
||||
4. Stop vaultwarden.
|
||||
@@ -61,15 +59,13 @@ load database
|
||||
|
||||
Please, note that you **are using this at your own risk and you are strongly advised to backup your installation and data!**. This is **unsupported** and has not been robustly tested.
|
||||
|
||||
1. Create a new (empty) database for vaultwarden:
|
||||
```sql
|
||||
CREATE DATABASE vaultwarden;
|
||||
```
|
||||
2. Create a new database user and grant rights to database:
|
||||
1. Create a new database user:
|
||||
```sql
|
||||
CREATE USER vaultwarden WITH ENCRYPTED PASSWORD 'yourpassword';
|
||||
GRANT ALL ON DATABASE vaultwarden TO vaultwarden;
|
||||
GRANT all privileges ON database vaultwarden TO vaultwarden;
|
||||
```
|
||||
2. Create a new (empty) database for vaultwarden, setting the user as the database owner:
|
||||
```sql
|
||||
CREATE DATABASE vaultwarden OWNER vaultwarden;
|
||||
```
|
||||
3. Configure vaultwarden and start it, so diesel can run migrations and set up the schema properly. Do not do anything else.
|
||||
4. Stop vaultwarden.
|
||||
|
||||
Reference in New Issue
Block a user