File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ## 3.5.0
2+
3+ #### Enhancement
4+
5+ - add new ** interpolation syntax** for using variables in schemas
6+
7+ #### Internal
8+
9+ - improve test :gem :
10+
111## 3.4.0
212
313#### Enhancement
414
515- significantly improve ** identity column** update. You can now increase the minimum value and decrease the maximum value
616- add reset ` search_path ` to ` public ` value for more accurate reading of database metadata
717
8-
918#### Bug Fix
1019
1120- add removal of ** serial sequence** before setting ` column.identity ` property. Fix [ #96 ] ( https://github.com/multum/pg-differ/issues/96 )
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ Regular expression to filter folder files
2222- Default: ` /\${([\s\S]+?)}/g `
2323- Required: ` false `
2424
25- The 'interpolate' delimiter
25+ [ Deprecated ] The 'interpolate' delimiter
2626
2727### locals
2828
@@ -31,3 +31,31 @@ The 'interpolate' delimiter
3131- Required: ` false `
3232
3333An object to import into the ` *.json ` files as locals
34+
35+ ``` javascript
36+ // index.js
37+ differ .import ({
38+ path: ' objects/role.schema.json' ,
39+ locals: {
40+ schema: ' public' ,
41+ sequenceOptions: { min: 1000 , start: 1000 },
42+ },
43+ });
44+ ```
45+
46+ ``` json5
47+ // objects/role.schema.json
48+ {
49+ type: ' table' ,
50+ properties: {
51+ name: ' ${schema}.role' , // using a variable as part of a string
52+ columns: {
53+ id: {
54+ type: ' int' ,
55+ identity: { $: ' sequenceOptions' }, // using a variable as JSON data
56+ },
57+ // ...
58+ },
59+ },
60+ }
61+ ```
You can’t perform that action at this time.
0 commit comments