Skip to content

Commit 5ffa69d

Browse files
committed
v2.16.2: Respect COLUMNS and ROWS env vars if stdout is not a TTY; improve logging
1 parent 6752a22 commit 5ffa69d

File tree

9 files changed

+487
-154
lines changed

9 files changed

+487
-154
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ Each microshard is a PostgreSQL schema with numeric suffix. Microshard schemas h
1919
## Usage
2020

2121
```
22+
pg-microsharding install
23+
[--dsn=DSN | --dsns=DNS1,DSN2,...]
24+
2225
pg-microsharding list | ls
2326
[--weight-sql='SELECT returning weight with optional unit']
2427
[--verbose]
@@ -246,7 +249,15 @@ This is the second part of pg-microsharding tool: a set of stored functions you
246249
247250
### Installing into the Database
248251
249-
Run the following SQL files in your up- and down-migrations to install (or upgrade) and uninstall the tool:
252+
To manually install or upgrade the library's stored functions in the database without a migration tool, run the `install` action:
253+
254+
```bash
255+
pg-microsharding install
256+
```
257+
258+
<figure><img src="https://raw.githubusercontent.com/dimikot/ent-framework/refs/heads/main/gitbook/.gitbook/assets/pg-microsharding-install.png" alt="" width="563"><figcaption></figcaption></figure>
259+
260+
Otherwise, run the following SQL files in your up- and down-migrations to install (or upgrade) and uninstall the tool:
250261

251262
* sql/pg-microsharding-up.sql: to install/upgrade the library
252263
* sql/pg-microsharding-down.sql: to uninstall

docs/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ Each microshard is a PostgreSQL schema with numeric suffix. Microshard schemas h
2323
## Usage
2424

2525
```
26+
pg-microsharding install
27+
[--dsn=DSN | --dsns=DNS1,DSN2,...]
28+
2629
pg-microsharding list | ls
2730
[--weight-sql='SELECT returning weight with optional unit']
2831
[--verbose]
@@ -250,7 +253,15 @@ This is the second part of pg-microsharding tool: a set of stored functions you
250253
251254
### Installing into the Database
252255
253-
Run the following SQL files in your up- and down-migrations to install (or upgrade) and uninstall the tool:
256+
To manually install or upgrade the library's stored functions in the database without a migration tool, run the `install` action:
257+
258+
```bash
259+
pg-microsharding install
260+
```
261+
262+
<figure><img src="https://raw.githubusercontent.com/dimikot/ent-framework/refs/heads/main/gitbook/.gitbook/assets/pg-microsharding-install.png" alt="" width="563"><figcaption></figcaption></figure>
263+
264+
Otherwise, run the following SQL files in your up- and down-migrations to install (or upgrade) and uninstall the tool:
254265

255266
* sql/pg-microsharding-up.sql: to install/upgrade the library
256267
* sql/pg-microsharding-down.sql: to uninstall

docs/functions/actionInstall.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
> **actionInstall**(`args`): `Promise`\<`boolean`\>
1010
11-
Defined in: src/actions/actionInstall.ts:8
11+
Defined in: [src/actions/actionInstall.ts:8](https://github.com/clickup/pg-microsharding/blob/master/src/actions/actionInstall.ts#L8)
1212

1313
Installs the library in the provided databases.
1414

docs/functions/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
> **install**(`__namedParameters`): `Promise`\<`void`\>
1010
11-
Defined in: src/api/install.ts:10
11+
Defined in: [src/api/install.ts:10](https://github.com/clickup/pg-microsharding/blob/master/src/api/install.ts#L10)
1212

1313
Installs/updates microsharding schema and functions.
1414

0 commit comments

Comments
 (0)