Skip to content

Commit

Permalink
DOC: updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael O'Brien committed Sep 30, 2021
1 parent 670f4dc commit 7fb4485
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,15 @@ You pass your OneTable configuration via the `onetable` collection. Ensure your

Generate a stub migration

Migrations are Javascript files that export the methods `up` and `down` to apply the migration and a `description` property.
Migrations are Javascript files that export the methods `up` and `down` to apply the migration and a `description` property. The migration must nominate a version and provide the OneTable schema that applies for the table data at this version level.

```sh
cd ./migrations
onetable generate migration
```

This will create a `0.0.1.js` migration that contains the following. Edit the `up` and `down` methods and description to suit.

The `db` property is the OneTable `Table` instance. This `migrate` property is an instance of the CLI Migrate class.

```javascript
Expand Down

0 comments on commit 7fb4485

Please sign in to comment.