Skip to content

Commit

Permalink
fix: Add length for mysql index
Browse files Browse the repository at this point in the history
  • Loading branch information
catto committed Jan 3, 2017
1 parent dbb7cd4 commit 9b38a3f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion models/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const MODEL = {
createTime: Joi
.string()
.isoDate()
.max(32)
.description('When this event was created')
.example('2038-01-19T03:14:08.131Z'),
creator: Scm.user
Expand All @@ -28,7 +29,7 @@ const MODEL = {
.description('Identifier of this pipeline')
.example(123345),
sha: Joi
.string().hex()
.string().hex().length(40)
.description('SHA this project was built on')
.example('ccc49349d3cffbd12ea9e3d41521480b4aa5de5f'),
type: Joi
Expand Down
2 changes: 1 addition & 1 deletion models/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const MODEL = {
.example(123345),

scmUri: Joi
.string().regex(Regex.SCM_URI)
.string().regex(Regex.SCM_URI).max(128)
.description('Unique identifier for the application')
.example('github.com:123456:master'),

Expand Down
1 change: 1 addition & 0 deletions models/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const MODEL = {

username: Joi
.string()
.max(128)
.description('Username')
.example('batman123'),

Expand Down

0 comments on commit 9b38a3f

Please sign in to comment.