Skip to content

Commit a7a9dea

Browse files
committed
fix: Make job description length up to 100K characters
Resolves: topcoder-platform/taas-app/topcoder-platform#374
1 parent 1a6ebff commit a7a9dea

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
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(100000)})
6+
},
7+
down: async (queryInterface, Sequelize) => {
8+
await queryInterface.changeColumn({ tableName: 'role_search_requests', schema: config.DB_SCHEMA_NAME}, 'job_description', {type: Sequelize.STRING(2000)})
9+
},
10+
}

src/models/RoleSearchRequest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ module.exports = (sequelize) => {
5555
},
5656
jobDescription: {
5757
field: 'job_description',
58-
type: Sequelize.STRING()
58+
type: Sequelize.STRING(100000)
5959
},
6060
skills: {
6161
type: Sequelize.ARRAY({

src/services/TeamService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ roleSearchRequest.schema = Joi.object()
792792
currentUser: Joi.object(),
793793
data: Joi.object().keys({
794794
roleId: Joi.string().uuid(),
795-
jobDescription: Joi.string().max(2000),
795+
jobDescription: Joi.string().max(100000),
796796
skills: Joi.array().items(Joi.string().uuid().required()),
797797
jobTitle: Joi.string().max(100),
798798
previousRoleSearchRequestId: Joi.string().uuid()

0 commit comments

Comments
 (0)