screwdriver-data-schema 22.9.8 → 22.9.10

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/config/regex.js CHANGED
@@ -89,9 +89,9 @@ module.exports = {
89
89
  // Third group: repo (e.g. data-schema)
90
90
  // Fourth group: branch name (e.g. #branchName)
91
91
  // Fifth group: root dir (e.g. :path/to/source/dir)
92
- // eslint-disable-next-line max-len
93
92
  CHECKOUT_URL:
94
- /^(?:(?:https:\/\/(?:[^@/:\s]+@)?)|git@|org-\d+@)+([^/:\s]+)(?:\/|:)([^/:\s]+)\/([^\s]+?)(?:\.git)(#[^:\s]+)?(:[^\s]+)?$/,
93
+ // eslint-disable-next-line no-irregular-whitespace
94
+ /^(?:(?:https:\/\/(?:[^@/:\s]+@)?)|git@|org-\d+@)+([^/:\s]+)(?:\/|:)([^/:\s]+)\/([^\s]+?)(?:\.git)(#[^: \s]* [^: \s]*|#[^: \s]+)?(:[^: \s]* [^: \s]*|:[^: \s]+)?$/,
95
95
  // scmUri. For example: github.com:abc-123:master or bitbucket.org:{123}:master
96
96
  // Optionally, can have rootDir. For example: github.com:abc-123:master:src/app/component
97
97
  SCM_URI: /^([^:]+):([^:]+):([^:]+)(?::([^:]+))?$/,
@@ -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.10",
4
4
  "description": "Internal Data Schema of Screwdriver",
5
5
  "main": "index.js",
6
6
  "scripts": {