Skip to content
This repository was archived by the owner on Sep 20, 2025. It is now read-only.

Commit 97f2877

Browse files
committed
Allow null for product description
1 parent 2d72292 commit 97f2877

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/migrations/v1/20250625213957-create-product.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ module.exports = {
2727
type: Sequelize.FLOAT
2828
},
2929
description: {
30-
type: Sequelize.STRING
30+
type: Sequelize.STRING,
31+
allowNull: true,
3132
},
3233
manufacturersId: {
3334
type: Sequelize.INTEGER

src/models/v1/product.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ module.exports = (sequelize, DataTypes) => {
5959
type: DataTypes.FLOAT
6060
},
6161
description: {
62-
type: DataTypes.STRING
62+
type: DataTypes.STRING,
63+
allowNull: true,
6364
},
6465
manufacturersId: {
6566
type: DataTypes.INTEGER

0 commit comments

Comments
 (0)