You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **Important:** See [Options](#options) for common options shared all commands. <br>In this `API` section, you will only find **command-specific** options listed.
154
+
155
+
153
156
### ley.up(opts?)
154
157
Returns: `Promise<string[]>`
155
158
156
159
Returns a list of the _relative filenames_ (eg, `000-users.js`) that were successfully applied.
157
160
158
-
#### opts.cwd
159
-
Type: `string`<br>
160
-
Default: `.`
161
-
162
-
A target location to treat as the current working directory.
163
-
164
-
> **Note:** This value is `path.resolve()`d from the current `process.cwd()` location.
165
-
166
-
#### opts.dir
167
-
Type: `string`<br>
168
-
Default: `migrations`
169
-
170
-
The directory (relative to `opts.cwd`) to find migration files.
171
-
172
-
#### opts.client
173
-
Type: `string`<br>
174
-
Default: `undefined`
175
-
176
-
The **name** of your desired client driver; for example, `pg`.<br>
177
-
When unspecified, `ley` searches for all supported client drivers in this order:
178
-
179
-
```js
180
-
['postgres', 'pg']; // TODO: more
181
-
```
182
-
183
-
#### opts.config
184
-
Type: `object`<br>
185
-
Default: `undefined`
186
-
187
-
A configuration object for your client driver to establish a connection.<br>
188
-
When unspecified, `ley` assumes that your client driver is able to connect through `process.env` variables.
189
-
190
-
>**Note:** The `ley` CLI will search for a `ley.config.js` config file (configurable).<br>
191
-
If found, this file may contain an object or a function that resolves to your config object.
192
-
193
161
#### opts.single
194
162
Type: `boolean`<br>
195
163
Default: `false`
@@ -204,31 +172,6 @@ Returns: `Promise<string[]>`
204
172
205
173
Returns a list of the _relative filenames_ (eg, `000-users.js`) that were successfully applied.
206
174
207
-
#### opts.cwd
208
-
Type:`string`<br>
209
-
Default:`.`
210
-
211
-
A target location to treat as the current working directory.
212
-
213
-
>**Note:** This value is `path.resolve()`d from the current `process.cwd()` location.
214
-
215
-
#### opts.dir
216
-
Type:`string`<br>
217
-
Default:`migrations`
218
-
219
-
The directory (relative to `opts.cwd`) to find migration files.
220
-
221
-
#### opts.client
222
-
Type:`string`<br>
223
-
Default:`undefined`
224
-
225
-
The **name**of your desired client driver; for example, `pg`.<br>
226
-
When unspecified, `ley` searches for all supported client drivers inthis order:
227
-
228
-
```js
229
-
['postgres', 'pg']; // TODO: more
230
-
```
231
-
232
175
#### opts.all
233
176
Type:`boolean`<br>
234
177
Default:`false`
@@ -242,31 +185,6 @@ Returns: `Promise<string[]>`
242
185
243
186
Returns a list of the _relative filenames_ (eg, `000-users.js`) that have not yet been applied.
244
187
245
-
#### opts.cwd
246
-
Type: `string`<br>
247
-
Default: `.`
248
-
249
-
A target location to treat as the current working directory.
250
-
251
-
> **Note:** This value is `path.resolve()`d from the current `process.cwd()` location.
252
-
253
-
#### opts.dir
254
-
Type: `string`<br>
255
-
Default: `migrations`
256
-
257
-
The directory (relative to `opts.cwd`) to find migration files.
258
-
259
-
#### opts.client
260
-
Type: `string`<br>
261
-
Default: `undefined`
262
-
263
-
The **name** of your desired client driver; for example, `pg`.<br>
264
-
When unspecified, `ley` searches for all supported client drivers in this order:
265
-
266
-
```js
267
-
['postgres', 'pg']; // TODO: more
268
-
```
269
-
270
188
271
189
### ley.new(opts?)
272
190
Returns: `Promise<string>`
@@ -294,6 +212,11 @@ Default: `5`
294
212
When **not** using a timestamped prefix, this value controls the prefix total length.<br>
295
213
For example, `00000-users.js` will be followed by `00001-teams.js`.
296
214
215
+
216
+
## Options
217
+
218
+
> **Note:** These are available to _all_ `ley` commands. <br>_See [API](#api) for programmatic command documentation._
219
+
297
220
#### opts.cwd
298
221
Type: `string`<br>
299
222
Default: `.`
@@ -308,6 +231,27 @@ Default: `migrations`
308
231
309
232
The directory (relative to `opts.cwd`) to find migration files.
310
233
234
+
#### opts.client
235
+
Type: `string`<br>
236
+
Default: `undefined`
237
+
238
+
The **name** of your desired client driver; for example, `pg`.<br>
239
+
When unspecified, `ley` searches for all supported client drivers in this order:
240
+
241
+
```js
242
+
['postgres', 'pg']; // TODO: more
243
+
```
244
+
245
+
#### opts.config
246
+
Type: `object`<br>
247
+
Default: `undefined`
248
+
249
+
A configuration object for your client driver to establish a connection.<br>
250
+
When unspecified, `ley` assumes that your client driver is able to connect through `process.env` variables.
251
+
252
+
>**Note:** The `ley` CLI will search for a `ley.config.js` config file (configurable).<br>
253
+
If found, this file may contain an object or a function that resolves to your config object.
0 commit comments