datatype chaged for description and product name
This commit is contained in:
parent
87f9b87a0d
commit
5934130888
@ -29,11 +29,11 @@ module.exports = (sequelize, DataTypes) => {
|
||||
allowNull: true,
|
||||
},
|
||||
description: {
|
||||
type: DataTypes.STRING,
|
||||
type: DataTypes.STRING(1000),
|
||||
allowNull: true,
|
||||
validate: {
|
||||
len: {
|
||||
args: [0, 1000],
|
||||
args: [1, 1000],
|
||||
msg: "Description is too long. Maximum allowed length is 1000 characters."
|
||||
}}
|
||||
},
|
||||
|
||||
@ -6,12 +6,12 @@ module.exports = (sequelize, DataTypes) => {
|
||||
primaryKey: true,
|
||||
},
|
||||
product_name: {
|
||||
type: DataTypes.TEXT,
|
||||
allowNull: false,
|
||||
unique: true,
|
||||
validate: {
|
||||
type: DataTypes.STRING(1000),
|
||||
allowNull: false,
|
||||
unique: true,
|
||||
validate: {
|
||||
len: {
|
||||
args: [0, 1000],
|
||||
args: [1, 1000],
|
||||
msg: "Product Name is too long. Maximum allowed length is 1000 characters."
|
||||
}}
|
||||
},
|
||||
@ -26,11 +26,11 @@ module.exports = (sequelize, DataTypes) => {
|
||||
}}
|
||||
},
|
||||
hs_description: {
|
||||
type: DataTypes.TEXT,
|
||||
type: DataTypes.STRING(1000),
|
||||
allowNull: true,
|
||||
validate: {
|
||||
len: {
|
||||
args: [0, 1000],
|
||||
args: [1, 1000],
|
||||
msg: "HS Description is too long. Maximum allowed length is 1000 characters."
|
||||
}}
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user