mirror of
https://github.com/netbirdio/docs.git
synced 2026-08-24 16:51:26 +02:00
Update sqlite to postgres migration (#771)
This commit is contained in:
@@ -71,7 +71,10 @@ CAST
|
||||
column accounts.settings_routing_peer_dns_resolution_enabled to boolean,
|
||||
column accounts.settings_extra_peer_approval_enabled to boolean,
|
||||
column accounts.settings_extra_user_approval_required to boolean,
|
||||
column accounts.settings_lazy_connection_enabled to boolean
|
||||
column accounts.settings_lazy_connection_enabled to boolean,
|
||||
column accounts.settings_peer_expose_enabled to boolean,
|
||||
column accounts.settings_auto_update_always to boolean,
|
||||
column accounts.settings_local_mfa_enabled to boolean
|
||||
;
|
||||
```
|
||||
|
||||
@@ -95,7 +98,7 @@ server:
|
||||
|
||||
store:
|
||||
engine: "postgres"
|
||||
dsn: "host=postgres-server user=postgres password=password dbname=postgres port=5432"
|
||||
dsn: "host=postgres-server user=postgres password=password dbname=postgres port=5432 sslmode=disable"
|
||||
```
|
||||
|
||||
Alternatively, you can pass the connection string as an environment variable instead of putting it in the config file:
|
||||
@@ -103,7 +106,7 @@ Alternatively, you can pass the connection string as an environment variable ins
|
||||
```yaml
|
||||
netbird-server:
|
||||
environment:
|
||||
- NETBIRD_STORE_ENGINE_POSTGRES_DSN=host=postgres-server user=postgres password=password dbname=postgres port=5432
|
||||
- NETBIRD_STORE_ENGINE_POSTGRES_DSN=host=postgres-server user=postgres password=password dbname=postgres port=5432 sslmode=disable
|
||||
```
|
||||
|
||||
## Restart and Verify
|
||||
@@ -145,12 +148,16 @@ LOAD DATABASE
|
||||
WITH include drop, create tables, create indexes, reset sequences
|
||||
|
||||
CAST
|
||||
type blob to bytea drop default using byte-vector-to-bytea,
|
||||
column client.public to boolean,
|
||||
column auth_request.force_approval_prompt to boolean,
|
||||
column auth_request.logged_in to boolean,
|
||||
column auth_request.claims_email_verified to boolean,
|
||||
column auth_code.claims_email_verified to boolean,
|
||||
column refresh_token.claims_email_verified to boolean
|
||||
column refresh_token.claims_email_verified to boolean,
|
||||
column auth_request.mfa_validated to boolean,
|
||||
column password.email_verified to boolean,
|
||||
column user_identity.claims_email_verified to boolean
|
||||
;
|
||||
```
|
||||
|
||||
@@ -235,4 +242,4 @@ server:
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user