Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
multum committed Oct 20, 2020
1 parent 5eecbdf commit 4ac8e10
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
## 3.5.0

#### Enhancement

- add new **interpolation syntax** for using variables in schemas

#### Internal

- improve test :gem:

## 3.4.0

#### Enhancement

- significantly improve **identity column** update. You can now increase the minimum value and decrease the maximum value
- add reset `search_path` to `public` value for more accurate reading of database metadata


#### Bug Fix

- add removal of **serial sequence** before setting `column.identity` property. Fix [#96](https://github.com/multum/pg-differ/issues/96)
Expand Down
30 changes: 29 additions & 1 deletion docs/import.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Regular expression to filter folder files
- Default: `/\${([\s\S]+?)}/g`
- Required: `false`

The 'interpolate' delimiter
[Deprecated] The 'interpolate' delimiter

### locals

Expand All @@ -31,3 +31,31 @@ The 'interpolate' delimiter
- Required: `false`

An object to import into the `*.json` files as locals

```javascript
// index.js
differ.import({
path: 'objects/role.schema.json',
locals: {
schema: 'public',
sequenceOptions: { min: 1000, start: 1000 },
},
});
```

```json5
// objects/role.schema.json
{
type: 'table',
properties: {
name: '${schema}.role', // using a variable as part of a string
columns: {
id: {
type: 'int',
identity: { $: 'sequenceOptions' }, // using a variable as JSON data
},
// ...
},
},
}
```

0 comments on commit 4ac8e10

Please sign in to comment.