Skip to content

Commit 6022a2b

Browse files
committed
v2.15.1: Add support for solo CREATE INDEX CONCURRENTLY in a migration version file
1 parent dd3620a commit 6022a2b

26 files changed

+898
-558
lines changed

docs/functions/actionDigest.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[**@clickup/pg-mig**](../README.md)
2+
3+
***
4+
5+
[@clickup/pg-mig](../globals.md) / actionDigest
6+
7+
# Function: actionDigest()
8+
9+
> **actionDigest**(`_options`, `registry`): `Promise`\<`boolean`\>
10+
11+
Defined in: src/actions/actionDigest.ts:12
12+
13+
Prints the "code digest", of all migration version names on disk. Digest is a
14+
string, and those strings can be compared lexicographically to determine
15+
whether the code version is compatible with the DB version: if the DB's
16+
digest is greater or equal to the code's digest, then they are compatible, so
17+
the code can be deployed.
18+
19+
## Parameters
20+
21+
| Parameter | Type |
22+
| ------ | ------ |
23+
| `_options` | [`MigrateOptions`](../interfaces/MigrateOptions.md) |
24+
| `registry` | `Registry` |
25+
26+
## Returns
27+
28+
`Promise`\<`boolean`\>

docs/functions/actionList.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[**@clickup/pg-mig**](../README.md)
2+
3+
***
4+
5+
[@clickup/pg-mig](../globals.md) / actionList
6+
7+
# Function: actionList()
8+
9+
> **actionList**(`_options`, `registry`): `Promise`\<`boolean`\>
10+
11+
Defined in: src/actions/actionList.ts:9
12+
13+
Prints the list of all migration versions in the registry.
14+
15+
## Parameters
16+
17+
| Parameter | Type |
18+
| ------ | ------ |
19+
| `_options` | [`MigrateOptions`](../interfaces/MigrateOptions.md) |
20+
| `registry` | `Registry` |
21+
22+
## Returns
23+
24+
`Promise`\<`boolean`\>

docs/functions/actionMake.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[**@clickup/pg-mig**](../README.md)
2+
3+
***
4+
5+
[@clickup/pg-mig](../globals.md) / actionMake
6+
7+
# Function: actionMake()
8+
9+
> **actionMake**(`options`, `registry`, `name`): `Promise`\<`boolean`\>
10+
11+
Defined in: src/actions/actionMake.ts:13
12+
13+
Makes new migration files.
14+
15+
## Parameters
16+
17+
| Parameter | Type |
18+
| ------ | ------ |
19+
| `options` | [`MigrateOptions`](../interfaces/MigrateOptions.md) |
20+
| `registry` | `Registry` |
21+
| `name` | `string` |
22+
23+
## Returns
24+
25+
`Promise`\<`boolean`\>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[**@clickup/pg-mig**](../README.md)
2+
3+
***
4+
5+
[@clickup/pg-mig](../globals.md) / actionUndoOrApply
6+
7+
# Function: actionUndoOrApply()
8+
9+
> **actionUndoOrApply**(`options`, `hostDests`, `registry`): `Promise`\<\{ `success`: `boolean`; `hasMoreWork`: `boolean`; \}\>
10+
11+
Defined in: src/actions/actionUndoOrApply.ts:27
12+
13+
Applies or undoes migrations.
14+
15+
## Parameters
16+
17+
| Parameter | Type |
18+
| ------ | ------ |
19+
| `options` | [`MigrateOptions`](../interfaces/MigrateOptions.md) |
20+
| `hostDests` | `Dest`[] |
21+
| `registry` | `Registry` |
22+
23+
## Returns
24+
25+
`Promise`\<\{ `success`: `boolean`; `hasMoreWork`: `boolean`; \}\>

docs/functions/cli.md

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

99
> **cli**(): `void`
1010
11-
Defined in: [src/cli.ts:485](https://github.com/clickup/pg-mig/blob/master/src/cli.ts#L485)
11+
Defined in: [src/cli.ts:239](https://github.com/clickup/pg-mig/blob/master/src/cli.ts#L239)
1212

1313
A wrapper around main() to call it from a bin script.
1414

docs/functions/loadDBDigest.md

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

99
> **loadDBDigest**\<`TDest`\>(`dests`, `sqlRunner`): `Promise`\<`string`\>
1010
11-
Defined in: [src/cli.ts:239](https://github.com/clickup/pg-mig/blob/master/src/cli.ts#L239)
11+
Defined in: [src/cli.ts:225](https://github.com/clickup/pg-mig/blob/master/src/cli.ts#L225)
1212

1313
Loads the digest strings from the provided databases and chooses the one
1414
which reflects the database schema status the best.

docs/functions/main.md

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

99
> **main**(`argsIn`): `Promise`\<`boolean`\>
1010
11-
Defined in: [src/cli.ts:87](https://github.com/clickup/pg-mig/blob/master/src/cli.ts#L87)
11+
Defined in: [src/cli.ts:73](https://github.com/clickup/pg-mig/blob/master/src/cli.ts#L73)
1212

1313
CLI tool entry point. This function is run when `pg-mig` is called from the
1414
command line. Accepts parameters from process.argv. See `migrate()` for

docs/functions/migrate.md

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

99
> **migrate**(`options`): `Promise`\<`boolean`\>
1010
11-
Defined in: [src/cli.ts:169](https://github.com/clickup/pg-mig/blob/master/src/cli.ts#L169)
11+
Defined in: [src/cli.ts:155](https://github.com/clickup/pg-mig/blob/master/src/cli.ts#L155)
1212

1313
Similar to main(), but accepts options explicitly, not from process.argv.
1414
This function is meant to be called from other tools.

docs/globals.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010

1111
## Functions
1212

13+
- [actionDigest](functions/actionDigest.md)
14+
- [actionList](functions/actionList.md)
15+
- [actionMake](functions/actionMake.md)
16+
- [actionUndoOrApply](functions/actionUndoOrApply.md)
1317
- [main](functions/main.md)
1418
- [migrate](functions/migrate.md)
1519
- [loadDBDigest](functions/loadDBDigest.md)

docs/interfaces/MigrateOptions.md

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

77
# Interface: MigrateOptions
88

9-
Defined in: [src/cli.ts:33](https://github.com/clickup/pg-mig/blob/master/src/cli.ts#L33)
9+
Defined in: [src/cli.ts:19](https://github.com/clickup/pg-mig/blob/master/src/cli.ts#L19)
1010

1111
Options for the migrate() function.
1212

0 commit comments

Comments
 (0)