Skip to content

Commit 4f6ac73

Browse files
committed
feat: increase length of ProjectType's and ProductCategory's "info" field length
1 parent 19d2288 commit 4f6ac73

File tree

8 files changed

+29
-16
lines changed

8 files changed

+29
-16
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
--
2+
-- UPDATE EXISTING TABLES:
3+
-- project_templates:
4+
-- modify column `info`
5+
-- project_types:
6+
-- modify column `info`
7+
-- product_categories:
8+
-- modify column `info`
9+
10+
--
11+
-- project_templates
12+
13+
ALTER TABLE project_templates ALTER COLUMN "info" TYPE character varying(1024);
14+
15+
--
16+
-- project_types
17+
18+
ALTER TABLE project_types ALTER COLUMN "info" TYPE character varying(1024);
19+
20+
--
21+
-- product_categories
22+
23+
ALTER TABLE product_categories ALTER COLUMN "info" TYPE character varying(1024);

migrations/20200130_increase_project_template_info_length.sql

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/models/productCategory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = function defineProductCategory(sequelize, DataTypes) {
99
displayName: { type: DataTypes.STRING(255), allowNull: false },
1010
icon: { type: DataTypes.STRING(255), allowNull: false },
1111
question: { type: DataTypes.STRING(255), allowNull: false },
12-
info: { type: DataTypes.STRING(255), allowNull: false },
12+
info: { type: DataTypes.STRING(1024), allowNull: false },
1313
aliases: { type: DataTypes.JSON, allowNull: false },
1414
disabled: { type: DataTypes.BOOLEAN, defaultValue: false },
1515
hidden: { type: DataTypes.BOOLEAN, defaultValue: false },

src/models/projectType.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = function definePhaseProduct(sequelize, DataTypes) {
66
displayName: { type: DataTypes.STRING(255), allowNull: false },
77
icon: { type: DataTypes.STRING(255), allowNull: false },
88
question: { type: DataTypes.STRING(255), allowNull: false },
9-
info: { type: DataTypes.STRING(255), allowNull: false },
9+
info: { type: DataTypes.STRING(1024), allowNull: false },
1010
aliases: { type: DataTypes.JSON, allowNull: false },
1111
disabled: { type: DataTypes.BOOLEAN, defaultValue: false },
1212
hidden: { type: DataTypes.BOOLEAN, defaultValue: false },

src/routes/productCategories/create.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const schema = {
1717
displayName: Joi.string().max(255).required(),
1818
icon: Joi.string().max(255).required(),
1919
question: Joi.string().max(255).required(),
20-
info: Joi.string().max(255).required(),
20+
info: Joi.string().max(1024).required(),
2121
aliases: Joi.array().required(),
2222
disabled: Joi.boolean().optional(),
2323
hidden: Joi.boolean().optional(),

src/routes/productCategories/update.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const schema = {
2121
displayName: Joi.string().max(255).optional(),
2222
icon: Joi.string().max(255).optional(),
2323
question: Joi.string().max(255).optional(),
24-
info: Joi.string().max(255).optional(),
24+
info: Joi.string().max(1024).optional(),
2525
aliases: Joi.array().optional(),
2626
disabled: Joi.boolean().optional(),
2727
hidden: Joi.boolean().optional(),

src/routes/projectTypes/create.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const schema = {
1717
displayName: Joi.string().max(255).required(),
1818
icon: Joi.string().max(255).required(),
1919
question: Joi.string().max(255).required(),
20-
info: Joi.string().max(255).required(),
20+
info: Joi.string().max(1024).required(),
2121
aliases: Joi.array().required(),
2222
disabled: Joi.boolean().optional(),
2323
hidden: Joi.boolean().optional(),

src/routes/projectTypes/update.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const schema = {
2020
displayName: Joi.string().max(255).optional(),
2121
icon: Joi.string().max(255).optional(),
2222
question: Joi.string().max(255).optional(),
23-
info: Joi.string().max(255).optional(),
23+
info: Joi.string().max(1024).optional(),
2424
aliases: Joi.array().optional(),
2525
disabled: Joi.boolean().optional(),
2626
hidden: Joi.boolean().optional(),

0 commit comments

Comments
 (0)