pub async fn create_db<DB: DbMarker>(
        &self,
        connections: u32,
    ) -> anyhow::Result<ConnectionPoolBuilder<DB>> {
        use sqlx::Executor as _;

        let mut conn = Self::connect_to(&self.url(""))
            .await
            .context("connect_to()")?;
        let db_old = self.db_name();
        let db_new = format!("test-{}", rand::thread_rng().gen::<u64>());
        conn.execute(format!("CREATE DATABASE \"{db_new}\" WITH TEMPLATE \"{db_old}\"").as_str())
            .await
            .context("CREATE DATABASE")?;

        Ok(ConnectionPool::<DB>::builder(
            self.url(&db_new),
            connections,
        ))
    }
Constructs a new temporary database (with a randomized name)
by cloning the database template pointed by TEST_DATABASE_URL env var.
The template is expected to have all migrations from dal/migrations applied.
For efficiency, the Postgres container of TEST_DATABASE_URL should be
configured with option "fsync=off" - it disables waiting for disk synchronization
whenever you write to the DBs, therefore making it as fast as an in-memory Postgres instance.
The database is not cleaned up automatically, but rather the whole Postgres
container is recreated whenever you call "zk test rust".
core/lib/db_connection/src/connection_pool.rs