@schemavaults/dbh 0.8.6 → 0.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ Ensure that you have both `postgres` and a `postgres-ws-proxy` containers runnin
|
|
|
20
20
|
|
|
21
21
|
You'll likely want to replace the `build:` sections for the services in the e2e test example `.yml` file with `image:`. For example, use `image: postgres:17.7` for the `postgres` service. For the proxy, you can pull the docker image from `ghcr.io/schemavaults/dbh/postgres-ws-proxy`; use the version number equal to your `@schemavaults/dbh` npm package installation:
|
|
22
22
|
```md
|
|
23
|
-
# NPM Package: @schemavaults/dbh@0.8.
|
|
23
|
+
# NPM Package: @schemavaults/dbh@0.8.8 => ghcr.io/schemavaults/dbh/postgres-ws-proxy:0.8.8
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
### In your application server code
|
|
@@ -36,7 +36,7 @@ You may need to define a custom `WsProxyUrlGenerator` function to determine how
|
|
|
36
36
|
#### CLI Help Command
|
|
37
37
|
```bash
|
|
38
38
|
# run migrations (and more) from the cli
|
|
39
|
-
|
|
39
|
+
npx @schemavaults/dbh --help
|
|
40
40
|
# or `bun run cli --help` if you have the dbh source repository as your working directory
|
|
41
41
|
```
|
|
42
42
|
|
|
@@ -44,11 +44,14 @@ bunx @schemavaults/dbh --help
|
|
|
44
44
|
```bash
|
|
45
45
|
mkdir ./tests/tmp
|
|
46
46
|
|
|
47
|
-
# compile TypeScript Kysely migrations to JavaScript
|
|
47
|
+
# compile TypeScript Kysely migrations to JavaScript (Bun is used for building migrations)
|
|
48
48
|
bunx @schemavaults/dbh build-db-migrations ./src/tests/example-migrations \
|
|
49
49
|
--outdir ./tests/tmp/example-compiled-migrations \
|
|
50
50
|
--sql-module ./src/sql.ts \
|
|
51
51
|
--sql-outdir ./tests/tmp/
|
|
52
|
+
|
|
53
|
+
# apply built migrations to database (NodeJS is used for applying migrations)
|
|
54
|
+
npx @schemavaults/dbh migrate ./tests/tmp/example-compiled-migrations --environment production --env-file ./.env.production
|
|
52
55
|
|
|
53
56
|
rm -rf ./tests/tmp
|
|
54
57
|
```
|