Skip to content

Commit e418a07

Browse files
committed
Make job description length in role search request 2000 characters instead of 255. Add custom role to database
1 parent c4b187a commit e418a07

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-1
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const config = require('config')
2+
3+
module.exports = {
4+
up: async (queryInterface, Sequelize) => {
5+
await queryInterface.changeColumn({ tableName: 'role_search_requests', schema: config.DB_SCHEMA_NAME}, 'job_description', {type: Sequelize.STRING(2000)})
6+
},
7+
down: async (queryInterface, Sequelize) => {
8+
await queryInterface.changeColumn({ tableName: 'role_search_requests', schema: config.DB_SCHEMA_NAME}, 'job_description', {type: Sequelize.STRING(255)})
9+
},
10+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
const config = require('config')
2+
const { v4: uuid } = require('uuid')
3+
4+
module.exports = {
5+
up: async (queryInterface, Sequelize) => {
6+
await queryInterface.bulkInsert({ tableName: 'roles', schema: config.DB_SCHEMA_NAME }, [{
7+
id: uuid(),
8+
name: 'Custom',
9+
rates: [
10+
{
11+
"global": 1200,
12+
"off_shore": 1200,
13+
"in_country": 1200,
14+
}
15+
],
16+
created_by: config.m2m.M2M_AUDIT_USER_ID,
17+
created_at: new Date()
18+
}], {}, { rates: { type: Sequelize.ARRAY({ type: Sequelize.JSONB() })}})
19+
},
20+
down: async (queryInterface) => {
21+
await queryInterface.bulkDelete({ tableName: 'roles', schema: config.DB_SCHEMA_NAME }, { name: 'Custom' })
22+
}
23+
}

src/services/TeamService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ createRoleSearchRequest.schema = Joi.object()
977977
currentUser: Joi.object().required(),
978978
roleSearchRequest: Joi.object().keys({
979979
roleId: Joi.string().uuid(),
980-
jobDescription: Joi.string().max(255),
980+
jobDescription: Joi.string().max(2000),
981981
skills: Joi.array().items(Joi.string().uuid().required())
982982
}).required().min(1)
983983
}).required()

0 commit comments

Comments
 (0)