create-sip 1.4.0 → 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('./database/seeders/*.js')
642
+ const umzug = await getUmzug(seederPath)
641
643
  await umzug.up()
642
644
  }
643
645
 
@@ -10,7 +10,9 @@ async function up({context: QueryInterface}) {
10
10
  },
11
11
  name: {
12
12
  type: DataTypes.STRING
13
- }
13
+ },
14
+ createdAt: { type: DataTypes.DATE },
15
+ updatedAt: { type: DataTypes.DATE }
14
16
  });
15
17
  }
16
18
 
@@ -1,20 +1,12 @@
1
- import db from '../../app/models/modrels.js';
2
1
 
3
2
  async function up({context: QueryInterface}) {
4
- if(db.Thing) {
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 }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-sip",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "main": "index.js",
5
5
  "bin": {
6
6
  "create-sip": "create-sip.js"