screwdriver-data-schema 21.20.0 → 21.22.0
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/provider.js +1 -0
- package/config/settings.js +3 -2
- package/migrations/20190919-initdb-banners.js +2 -1
- package/migrations/20190919-initdb-buildClusters.js +4 -2
- package/migrations/20190919-initdb-builds.js +8 -4
- package/migrations/20190919-initdb-collections.js +2 -1
- package/migrations/20190919-initdb-commandTags.js +6 -3
- package/migrations/20190919-initdb-commands.js +4 -2
- package/migrations/20190919-initdb-events.js +8 -4
- package/migrations/20190919-initdb-jobs.js +6 -3
- package/migrations/20190919-initdb-pipelines.js +4 -2
- package/migrations/20190919-initdb-secrets.js +4 -2
- package/migrations/20190919-initdb-steps.js +6 -3
- package/migrations/20190919-initdb-templateTags.js +8 -4
- package/migrations/20190919-initdb-templates.js +6 -3
- package/migrations/20190919-initdb-tokens.js +8 -4
- package/migrations/20190919-initdb-triggers.js +6 -3
- package/migrations/20190919-initdb-users.js +6 -3
- package/migrations/20191221-upd-buildClusters-uniqueconstraint.js +2 -1
- package/package.json +1 -1
package/config/provider.js
CHANGED
package/config/settings.js
CHANGED
|
@@ -29,8 +29,9 @@ const SCHEMA_PIPELINE_SETTINGS = Joi.object()
|
|
|
29
29
|
metricsDowntimeJobs: SCHEMA_METRICS_DOWNTIME_JOBS,
|
|
30
30
|
metricsDowntimeStatuses: SCHEMA_METRICS_DOWNTIME_STATUSES,
|
|
31
31
|
public: Joi.boolean(),
|
|
32
|
-
groupedEvents: Joi.boolean().
|
|
33
|
-
showEventTriggers: Joi.boolean().
|
|
32
|
+
groupedEvents: Joi.boolean().optional(),
|
|
33
|
+
showEventTriggers: Joi.boolean().optional(),
|
|
34
|
+
filterEventsForNoBuilds: Joi.boolean().optional()
|
|
34
35
|
})
|
|
35
36
|
.default({});
|
|
36
37
|
|
|
@@ -36,8 +36,9 @@ module.exports = {
|
|
|
36
36
|
{ transaction }
|
|
37
37
|
);
|
|
38
38
|
|
|
39
|
-
await queryInterface.addConstraint(table,
|
|
39
|
+
await queryInterface.addConstraint(table, {
|
|
40
40
|
name: `${table}_message_createTime_type_key`,
|
|
41
|
+
fields: ['message', 'createTime', 'type'],
|
|
41
42
|
type: 'unique',
|
|
42
43
|
transaction
|
|
43
44
|
});
|
|
@@ -45,14 +45,16 @@ module.exports = {
|
|
|
45
45
|
{ transaction }
|
|
46
46
|
);
|
|
47
47
|
|
|
48
|
-
await queryInterface.addConstraint(table,
|
|
48
|
+
await queryInterface.addConstraint(table, {
|
|
49
49
|
name: `${table}_name_key`,
|
|
50
|
+
fields: ['name'],
|
|
50
51
|
type: 'unique',
|
|
51
52
|
transaction
|
|
52
53
|
});
|
|
53
54
|
|
|
54
|
-
await queryInterface.addIndex(table,
|
|
55
|
+
await queryInterface.addIndex(table, {
|
|
55
56
|
name: `${prefix}build_clusters_name`,
|
|
57
|
+
fields: ['name'],
|
|
56
58
|
transaction
|
|
57
59
|
});
|
|
58
60
|
});
|
|
@@ -78,24 +78,28 @@ module.exports = {
|
|
|
78
78
|
{ transaction }
|
|
79
79
|
);
|
|
80
80
|
|
|
81
|
-
await queryInterface.addConstraint(table,
|
|
81
|
+
await queryInterface.addConstraint(table, {
|
|
82
82
|
name: `${table}_jobId_number_key`,
|
|
83
|
+
fields: ['jobId', 'number'],
|
|
83
84
|
type: 'unique',
|
|
84
85
|
transaction
|
|
85
86
|
});
|
|
86
87
|
|
|
87
|
-
await queryInterface.addIndex(table,
|
|
88
|
+
await queryInterface.addIndex(table, {
|
|
88
89
|
name: `${table}_event_id_create_time`,
|
|
90
|
+
fields: ['eventId', 'createTime'],
|
|
89
91
|
transaction
|
|
90
92
|
});
|
|
91
93
|
|
|
92
|
-
await queryInterface.addIndex(table,
|
|
94
|
+
await queryInterface.addIndex(table, {
|
|
93
95
|
name: `${table}_job_id`,
|
|
96
|
+
fields: ['jobId'],
|
|
94
97
|
transaction
|
|
95
98
|
});
|
|
96
99
|
|
|
97
|
-
await queryInterface.addIndex(table,
|
|
100
|
+
await queryInterface.addIndex(table, {
|
|
98
101
|
name: `${table}_parent_build_id`,
|
|
102
|
+
fields: [{ attribute: 'parentBuildId', length: 32 }],
|
|
99
103
|
transaction
|
|
100
104
|
});
|
|
101
105
|
});
|
|
@@ -36,18 +36,21 @@ module.exports = {
|
|
|
36
36
|
{ transaction }
|
|
37
37
|
);
|
|
38
38
|
|
|
39
|
-
await queryInterface.addIndex(table,
|
|
39
|
+
await queryInterface.addIndex(table, {
|
|
40
40
|
name: `${prefix}command_tags_name`,
|
|
41
|
+
fields: ['name'],
|
|
41
42
|
transaction
|
|
42
43
|
});
|
|
43
44
|
|
|
44
|
-
await queryInterface.addIndex(table,
|
|
45
|
+
await queryInterface.addIndex(table, {
|
|
45
46
|
name: `${prefix}command_tags_namespace`,
|
|
47
|
+
fields: ['namespace'],
|
|
46
48
|
transaction
|
|
47
49
|
});
|
|
48
50
|
|
|
49
|
-
await queryInterface.addIndex(table,
|
|
51
|
+
await queryInterface.addIndex(table, {
|
|
50
52
|
name: `${prefix}command_tags_tag`,
|
|
53
|
+
fields: ['tag'],
|
|
51
54
|
transaction
|
|
52
55
|
});
|
|
53
56
|
});
|
|
@@ -60,13 +60,15 @@ module.exports = {
|
|
|
60
60
|
{ transaction }
|
|
61
61
|
);
|
|
62
62
|
|
|
63
|
-
await queryInterface.addIndex(table,
|
|
63
|
+
await queryInterface.addIndex(table, {
|
|
64
64
|
name: `${table}_name`,
|
|
65
|
+
fields: ['name'],
|
|
65
66
|
transaction
|
|
66
67
|
});
|
|
67
68
|
|
|
68
|
-
await queryInterface.addIndex(table,
|
|
69
|
+
await queryInterface.addIndex(table, {
|
|
69
70
|
name: `${table}_namespace`,
|
|
71
|
+
fields: ['namespace'],
|
|
70
72
|
transaction
|
|
71
73
|
});
|
|
72
74
|
});
|
|
@@ -63,24 +63,28 @@ module.exports = {
|
|
|
63
63
|
{ transaction }
|
|
64
64
|
);
|
|
65
65
|
|
|
66
|
-
await queryInterface.addConstraint(table,
|
|
66
|
+
await queryInterface.addConstraint(table, {
|
|
67
67
|
name: `${table}_createTime_sha_key`,
|
|
68
|
+
fields: ['createTime', 'sha'],
|
|
68
69
|
type: 'unique',
|
|
69
70
|
transaction
|
|
70
71
|
});
|
|
71
72
|
|
|
72
|
-
await queryInterface.addIndex(table,
|
|
73
|
+
await queryInterface.addIndex(table, {
|
|
73
74
|
name: `${table}_create_time_pipeline_id`,
|
|
75
|
+
fields: ['createTime', 'pipelineId'],
|
|
74
76
|
transaction
|
|
75
77
|
});
|
|
76
78
|
|
|
77
|
-
await queryInterface.addIndex(table,
|
|
79
|
+
await queryInterface.addIndex(table, {
|
|
78
80
|
name: `${table}_pipeline_id`,
|
|
81
|
+
fields: ['pipelineId'],
|
|
79
82
|
transaction
|
|
80
83
|
});
|
|
81
84
|
|
|
82
|
-
await queryInterface.addIndex(table,
|
|
85
|
+
await queryInterface.addIndex(table, {
|
|
83
86
|
name: `${table}_type`,
|
|
87
|
+
fields: ['type'],
|
|
84
88
|
transaction
|
|
85
89
|
});
|
|
86
90
|
});
|
|
@@ -51,19 +51,22 @@ module.exports = {
|
|
|
51
51
|
{ transaction }
|
|
52
52
|
);
|
|
53
53
|
|
|
54
|
-
await queryInterface.addConstraint(table,
|
|
54
|
+
await queryInterface.addConstraint(table, {
|
|
55
55
|
name: `${table}_name_pipelineId_key`,
|
|
56
|
+
fields: ['name', 'pipelineId'],
|
|
56
57
|
type: 'unique',
|
|
57
58
|
transaction
|
|
58
59
|
});
|
|
59
60
|
|
|
60
|
-
await queryInterface.addIndex(table,
|
|
61
|
+
await queryInterface.addIndex(table, {
|
|
61
62
|
name: `${table}_pipeline_id_state`,
|
|
63
|
+
fields: ['pipelineId', 'state'],
|
|
62
64
|
transaction
|
|
63
65
|
});
|
|
64
66
|
|
|
65
|
-
await queryInterface.addIndex(table,
|
|
67
|
+
await queryInterface.addIndex(table, {
|
|
66
68
|
name: `${table}_state`,
|
|
69
|
+
fields: ['state'],
|
|
67
70
|
transaction
|
|
68
71
|
});
|
|
69
72
|
});
|
|
@@ -57,14 +57,16 @@ module.exports = {
|
|
|
57
57
|
{ transaction }
|
|
58
58
|
);
|
|
59
59
|
|
|
60
|
-
await queryInterface.addConstraint(table,
|
|
60
|
+
await queryInterface.addConstraint(table, {
|
|
61
61
|
name: `${table}_scmUri_key`,
|
|
62
|
+
fields: ['scmUri'],
|
|
62
63
|
type: 'unique',
|
|
63
64
|
transaction
|
|
64
65
|
});
|
|
65
66
|
|
|
66
|
-
await queryInterface.addIndex(table,
|
|
67
|
+
await queryInterface.addIndex(table, {
|
|
67
68
|
name: `${table}_scm_uri`,
|
|
69
|
+
fields: ['scmUri'],
|
|
68
70
|
transaction
|
|
69
71
|
});
|
|
70
72
|
});
|
|
@@ -33,14 +33,16 @@ module.exports = {
|
|
|
33
33
|
{ transaction }
|
|
34
34
|
);
|
|
35
35
|
|
|
36
|
-
await queryInterface.addConstraint(table,
|
|
36
|
+
await queryInterface.addConstraint(table, {
|
|
37
37
|
name: `${table}_pipelineId_name_key`,
|
|
38
|
+
fields: ['pipelineId', 'name'],
|
|
38
39
|
type: 'unique',
|
|
39
40
|
transaction
|
|
40
41
|
});
|
|
41
42
|
|
|
42
|
-
await queryInterface.addIndex(table,
|
|
43
|
+
await queryInterface.addIndex(table, {
|
|
43
44
|
name: `${table}_pipeline_id`,
|
|
45
|
+
fields: ['pipelineId'],
|
|
44
46
|
transaction
|
|
45
47
|
});
|
|
46
48
|
});
|
|
@@ -42,19 +42,22 @@ module.exports = {
|
|
|
42
42
|
{ transaction }
|
|
43
43
|
);
|
|
44
44
|
|
|
45
|
-
await queryInterface.addConstraint(table,
|
|
45
|
+
await queryInterface.addConstraint(table, {
|
|
46
46
|
name: `${table}_buildId_name_key`,
|
|
47
|
+
fields: ['buildId', 'name'],
|
|
47
48
|
type: 'unique',
|
|
48
49
|
transaction
|
|
49
50
|
});
|
|
50
51
|
|
|
51
|
-
await queryInterface.addIndex(table,
|
|
52
|
+
await queryInterface.addIndex(table, {
|
|
52
53
|
name: `${table}_build_id`,
|
|
54
|
+
fields: ['buildId'],
|
|
53
55
|
transaction
|
|
54
56
|
});
|
|
55
57
|
|
|
56
|
-
await queryInterface.addIndex(table,
|
|
58
|
+
await queryInterface.addIndex(table, {
|
|
57
59
|
name: `${table}_name`,
|
|
60
|
+
fields: ['name'],
|
|
58
61
|
transaction
|
|
59
62
|
});
|
|
60
63
|
});
|
|
@@ -36,24 +36,28 @@ module.exports = {
|
|
|
36
36
|
{ transaction }
|
|
37
37
|
);
|
|
38
38
|
|
|
39
|
-
await queryInterface.addConstraint(table,
|
|
39
|
+
await queryInterface.addConstraint(table, {
|
|
40
40
|
name: `${table}_namespace_name_tag_key`,
|
|
41
|
+
fields: ['name', 'tag', 'namespace'],
|
|
41
42
|
type: 'unique',
|
|
42
43
|
transaction
|
|
43
44
|
});
|
|
44
45
|
|
|
45
|
-
await queryInterface.addIndex(table,
|
|
46
|
+
await queryInterface.addIndex(table, {
|
|
46
47
|
name: `${prefix}template_tags_name`,
|
|
48
|
+
fields: ['name'],
|
|
47
49
|
transaction
|
|
48
50
|
});
|
|
49
51
|
|
|
50
|
-
await queryInterface.addIndex(table,
|
|
52
|
+
await queryInterface.addIndex(table, {
|
|
51
53
|
name: `${prefix}template_tags_namespace`,
|
|
54
|
+
fields: ['namespace'],
|
|
52
55
|
transaction
|
|
53
56
|
});
|
|
54
57
|
|
|
55
|
-
await queryInterface.addIndex(table,
|
|
58
|
+
await queryInterface.addIndex(table, {
|
|
56
59
|
name: `${prefix}template_tags_tag`,
|
|
60
|
+
fields: ['tag'],
|
|
57
61
|
transaction
|
|
58
62
|
});
|
|
59
63
|
});
|
|
@@ -54,19 +54,22 @@ module.exports = {
|
|
|
54
54
|
{ transaction }
|
|
55
55
|
);
|
|
56
56
|
|
|
57
|
-
await queryInterface.addConstraint(table,
|
|
57
|
+
await queryInterface.addConstraint(table, {
|
|
58
58
|
name: `${table}_namespace_name_version_key`,
|
|
59
|
+
fields: ['name', 'version', 'namespace'],
|
|
59
60
|
type: 'unique',
|
|
60
61
|
transaction
|
|
61
62
|
});
|
|
62
63
|
|
|
63
|
-
await queryInterface.addIndex(table,
|
|
64
|
+
await queryInterface.addIndex(table, {
|
|
64
65
|
name: `${table}_name`,
|
|
66
|
+
fields: ['name'],
|
|
65
67
|
transaction
|
|
66
68
|
});
|
|
67
69
|
|
|
68
|
-
await queryInterface.addIndex(table,
|
|
70
|
+
await queryInterface.addIndex(table, {
|
|
69
71
|
name: `${table}_namespace`,
|
|
72
|
+
fields: ['namespace'],
|
|
70
73
|
transaction
|
|
71
74
|
});
|
|
72
75
|
});
|
|
@@ -39,24 +39,28 @@ module.exports = {
|
|
|
39
39
|
{ transaction }
|
|
40
40
|
);
|
|
41
41
|
|
|
42
|
-
await queryInterface.addConstraint(table,
|
|
42
|
+
await queryInterface.addConstraint(table, {
|
|
43
43
|
name: `${table}_hash_key`,
|
|
44
|
+
fields: ['hash'],
|
|
44
45
|
type: 'unique',
|
|
45
46
|
transaction
|
|
46
47
|
});
|
|
47
48
|
|
|
48
|
-
await queryInterface.addIndex(table,
|
|
49
|
+
await queryInterface.addIndex(table, {
|
|
49
50
|
name: `${table}_hash`,
|
|
51
|
+
fields: ['hash'],
|
|
50
52
|
transaction
|
|
51
53
|
});
|
|
52
54
|
|
|
53
|
-
await queryInterface.addIndex(table,
|
|
55
|
+
await queryInterface.addIndex(table, {
|
|
54
56
|
name: `${table}_pipeline_id`,
|
|
57
|
+
fields: ['pipelineId'],
|
|
55
58
|
transaction
|
|
56
59
|
});
|
|
57
60
|
|
|
58
|
-
await queryInterface.addIndex(table,
|
|
61
|
+
await queryInterface.addIndex(table, {
|
|
59
62
|
name: `${table}_user_id`,
|
|
63
|
+
fields: ['userId'],
|
|
60
64
|
transaction
|
|
61
65
|
});
|
|
62
66
|
});
|
|
@@ -27,19 +27,22 @@ module.exports = {
|
|
|
27
27
|
{ transaction }
|
|
28
28
|
);
|
|
29
29
|
|
|
30
|
-
await queryInterface.addConstraint(table,
|
|
30
|
+
await queryInterface.addConstraint(table, {
|
|
31
31
|
name: `${table}_src_dest_key`,
|
|
32
|
+
fields: ['src', 'dest'],
|
|
32
33
|
type: 'unique',
|
|
33
34
|
transaction
|
|
34
35
|
});
|
|
35
36
|
|
|
36
|
-
await queryInterface.addIndex(table,
|
|
37
|
+
await queryInterface.addIndex(table, {
|
|
37
38
|
name: `${table}_src`,
|
|
39
|
+
fields: ['src'],
|
|
38
40
|
transaction
|
|
39
41
|
});
|
|
40
42
|
|
|
41
|
-
await queryInterface.addIndex(table,
|
|
43
|
+
await queryInterface.addIndex(table, {
|
|
42
44
|
name: `${table}_dest`,
|
|
45
|
+
fields: ['dest'],
|
|
43
46
|
transaction
|
|
44
47
|
});
|
|
45
48
|
});
|
|
@@ -30,19 +30,22 @@ module.exports = {
|
|
|
30
30
|
{ transaction }
|
|
31
31
|
);
|
|
32
32
|
|
|
33
|
-
await queryInterface.addConstraint(table,
|
|
33
|
+
await queryInterface.addConstraint(table, {
|
|
34
34
|
name: `${table}_username_scmContext_key`,
|
|
35
|
+
fields: ['username', 'scmContext'],
|
|
35
36
|
type: 'unique',
|
|
36
37
|
transaction
|
|
37
38
|
});
|
|
38
39
|
|
|
39
|
-
await queryInterface.addIndex(table,
|
|
40
|
+
await queryInterface.addIndex(table, {
|
|
40
41
|
name: `${table}_scm_context`,
|
|
42
|
+
fields: ['scmContext'],
|
|
41
43
|
transaction
|
|
42
44
|
});
|
|
43
45
|
|
|
44
|
-
await queryInterface.addIndex(table,
|
|
46
|
+
await queryInterface.addIndex(table, {
|
|
45
47
|
name: `${table}_username`,
|
|
48
|
+
fields: ['username'],
|
|
46
49
|
transaction
|
|
47
50
|
});
|
|
48
51
|
});
|
|
@@ -11,8 +11,9 @@ module.exports = {
|
|
|
11
11
|
await queryInterface.sequelize.transaction(async transaction => {
|
|
12
12
|
await queryInterface.removeConstraint(table, `${table}_name_key`, transaction);
|
|
13
13
|
|
|
14
|
-
await queryInterface.addConstraint(table,
|
|
14
|
+
await queryInterface.addConstraint(table, {
|
|
15
15
|
name: `${table}_name_scmContext_key`,
|
|
16
|
+
fields: ['name', 'scmContext'],
|
|
16
17
|
type: 'unique',
|
|
17
18
|
transaction
|
|
18
19
|
});
|