Browse Source

Use 'scheme' instead of 'prefix' in DATABASE_URL messages

Per review feedback, 'scheme' is the more accurate term for the
sqlite:// portion of the URL.
pull/7061/head
mfw78 2 weeks ago
committed by mfw78
parent
commit
5da1d40994
  1. 4
      .env.template
  2. 2
      src/db/mod.rs

4
.env.template

@ -50,9 +50,9 @@
######################### #########################
## Database URL ## Database URL
## When using SQLite, this should use the sqlite:// prefix followed by the path ## When using SQLite, this should use the sqlite:// scheme followed by the path
## to the DB file. It defaults to sqlite://%DATA_FOLDER%/db.sqlite3. ## to the DB file. It defaults to sqlite://%DATA_FOLDER%/db.sqlite3.
## Bare paths without the sqlite:// prefix are supported for backwards compatibility, ## Bare paths without the sqlite:// scheme are supported for backwards compatibility,
## but only if the database file already exists. ## but only if the database file already exists.
# DATABASE_URL=sqlite://data/db.sqlite3 # DATABASE_URL=sqlite://data/db.sqlite3
## When using MySQL, specify an appropriate connection URI. ## When using MySQL, specify an appropriate connection URI.

2
src/db/mod.rs

@ -291,7 +291,7 @@ impl DbConnType {
err!(format!( err!(format!(
"`DATABASE_URL` does not match any known database scheme (mysql://, postgresql://, sqlite://) \ "`DATABASE_URL` does not match any known database scheme (mysql://, postgresql://, sqlite://) \
and no existing SQLite database was found at '{url}'. \ and no existing SQLite database was found at '{url}'. \
If you intend to use SQLite, use an explicit `sqlite://` prefix in your `DATABASE_URL`. \ If you intend to use SQLite, use an explicit `sqlite://` scheme in your `DATABASE_URL`. \
Otherwise, check your DATABASE_URL for typos or quoting issues." Otherwise, check your DATABASE_URL for typos or quoting issues."
)) ))
} }

Loading…
Cancel
Save