Database
IMPORTANT! prior to the v0.3 release bld used the
dieselcrate for connecting to ansqlitedatabase but from v0.3 onwards the project migrated toSeaOrmand now supportspostgres,mysqlas well assqliteas a database. Due to this change projects running a server in prior versions will have issues with migrations since this was a breaking change.
Bld supports connecting to a postgres, mysql or sqlite databases. To do so you need to provide an appropriate connection url in the .bld/config.yaml file. Below there are examples on how you can configure the url for all 3 backends.
Postgres
local:
server:
db: postgres://some_user:some_password@127.0.0.1/bld-server
And an example using an explicit port:
local:
server:
db: postgres://some_user:some_password@127.0.0.1:8888/bld-server
Mysql
local:
server:
db: mysql://some_user:some_password@127.0.0.1/bld-server
And an example using an explicit port:
local:
server:
db: mysql://some_user:some_password@127.0.0.1:8888/bld-server
Sqlite
local:
server:
db: sqlite:///some/path/to/.bld/db/bld-server.db