22 lines
442 B
Bash
22 lines
442 B
Bash
#!/bin/sh
|
|
|
|
cname=`docker run -d --rm -e POSTGRES_PASSWORD=password -p 127.0.0.10:55432:5432 postgres:15`
|
|
|
|
onstop() {
|
|
docker stop $cname
|
|
}
|
|
|
|
trap onstop EXIT
|
|
|
|
export RAKER_DATABASE_URL=postgres://postgres:password@127.0.0.10:55432/postgres
|
|
|
|
echo "Running migrations"
|
|
sqlx migrate run
|
|
echo "Preparing offline mode SQLx data"
|
|
#cargo sqlx prepare
|
|
cargo sqlx prepare -- --lib
|
|
#cargo sqlx prepare --merged -- --all-features --all-targets --lib
|
|
|
|
|
|
|