create-sip 1.4.1 → 1.4.2
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.
package/expressapi/op
CHANGED
|
@@ -558,6 +558,8 @@ async function runMigrations() {
|
|
|
558
558
|
|
|
559
559
|
async function resetMigrations() {
|
|
560
560
|
console.log('Reset migrations...')
|
|
561
|
+
const umzugSeeder = await getUmzug('./database/seeders/*.js')
|
|
562
|
+
await umzugSeeder.down({ to: 0 })
|
|
561
563
|
const umzug = await getUmzug('./database/migrations/*.js')
|
|
562
564
|
await umzug.down({ to: 0 })
|
|
563
565
|
}
|
|
@@ -637,7 +639,7 @@ async function runOneSeeder(name) {
|
|
|
637
639
|
process.exit(1)
|
|
638
640
|
}
|
|
639
641
|
|
|
640
|
-
const umzug = await getUmzug(
|
|
642
|
+
const umzug = await getUmzug(seederPath)
|
|
641
643
|
await umzug.up()
|
|
642
644
|
}
|
|
643
645
|
|
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
import db from '../../app/models/modrels.js';
|
|
2
1
|
|
|
3
2
|
async function up({context: QueryInterface}) {
|
|
4
|
-
|
|
5
|
-
await db.Thing.bulkCreate([
|
|
6
|
-
|
|
7
|
-
]);
|
|
8
|
-
}else {
|
|
9
|
-
await QueryInterface.bulkInsert('things', [
|
|
10
|
-
|
|
11
|
-
]);
|
|
12
|
-
}
|
|
3
|
+
await QueryInterface.bulkInsert('things', [
|
|
13
4
|
|
|
5
|
+
]);
|
|
14
6
|
}
|
|
15
7
|
|
|
16
8
|
async function down({context: QueryInterface}) {
|
|
17
|
-
await QueryInterface.bulkDelete('things');
|
|
9
|
+
await QueryInterface.bulkDelete('things', null, {});
|
|
18
10
|
}
|
|
19
11
|
|
|
20
12
|
export { up, down }
|