create-sip 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +40 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -113,17 +113,22 @@ Command:
113
113
  node op conf:generate
114
114
  ```
115
115
 
116
- ### Seed database
116
+ ### Database import
117
117
 
118
118
  Load data from JSON or CSV file.
119
119
 
120
120
  Examples:
121
121
 
122
122
  ```bash
123
- node op db:seed thing somethings.json
124
- node op db:seed thing somethings.csv
123
+ node op db:import thing somethings.json
124
+ node op db:import thing somethings.csv
125
+ node op db:import thing somethings.csv :
126
+ node op db:import thing somethings.csv ";"
127
+ node op db:import thing somethings.csv ,
125
128
  ```
126
129
 
130
+ The last option is the separator.
131
+
127
132
  For example JSON file:
128
133
 
129
134
  employees.json:
@@ -138,7 +143,7 @@ employees.json:
138
143
  The default separator is comma.
139
144
 
140
145
  ```cmd
141
- node op db:seed employee employees.json
146
+ node op db:import employee employees.json
142
147
  ```
143
148
 
144
149
  For example CSV file:
@@ -160,7 +165,7 @@ id:name
160
165
  ```
161
166
 
162
167
  ```cmd
163
- node op db:seed employee employees.csv --sep :
168
+ node op db:import employee employees.csv --sep :
164
169
  ```
165
170
 
166
171
  If the file has semicolon separator, use sep parameter, for example:
@@ -174,5 +179,34 @@ id;name
174
179
  Use next command:
175
180
 
176
181
  ```cmd
177
- node op db:seed employee employees.csv --sep ";"
182
+ node op db:import employee employees.csv --sep ";"
183
+ ```
184
+
185
+ ## Migration
186
+
187
+ Generate migration:
188
+
189
+ ```bash
190
+ node op make:migration <name>
191
+ ```
192
+
193
+ Run migration:
194
+
195
+ ```bash
196
+ node op migration:run
178
197
  ```
198
+
199
+ Reset database:
200
+
201
+ ```bash
202
+ node op migration:reset
203
+ ```
204
+
205
+ Rollback migrations:
206
+
207
+ ```bash
208
+ node op migration:rollback
209
+ node op migration:rollback --step 2
210
+ ```
211
+
212
+ The steop option is the number of migrations to rollback.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-sip",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "main": "index.js",
5
5
  "bin": {
6
6
  "create-sip": "create-sip.js"