screwdriver-data-schema 22.9.8 → 22.9.9

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.
@@ -0,0 +1,21 @@
1
+ /* eslint-disable new-cap */
2
+
3
+ 'use strict';
4
+
5
+ const prefix = process.env.DATASTORE_SEQUELIZE_PREFIX || '';
6
+ const table = `${prefix}builds`;
7
+
8
+ module.exports = {
9
+ // eslint-disable-next-line no-unused-vars
10
+ up: async (queryInterface, Sequelize) => {
11
+ await queryInterface.sequelize.transaction(async transaction => {
12
+ await queryInterface.removeIndex(table, `${table}_template_Id`, { transaction });
13
+
14
+ await queryInterface.addIndex(table, {
15
+ name: `${table}_templateId_createTime`,
16
+ fields: ['templateId', 'createTime'],
17
+ transaction
18
+ });
19
+ });
20
+ }
21
+ };
package/models/build.js CHANGED
@@ -246,6 +246,6 @@ module.exports = {
246
246
  { fields: ['eventId', 'createTime'] },
247
247
  { fields: ['jobId'] },
248
248
  { fields: [{ attribute: 'parentBuildId', length: 32 }] },
249
- { fields: ['templateId'] }
249
+ { fields: ['templateId', 'createTime'] }
250
250
  ]
251
251
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screwdriver-data-schema",
3
- "version": "22.9.8",
3
+ "version": "22.9.9",
4
4
  "description": "Internal Data Schema of Screwdriver",
5
5
  "main": "index.js",
6
6
  "scripts": {