Skip to content

Commit 0dec8fc

Browse files
committed
fix: increase "path" length for attachments
1 parent f5283dc commit 0dec8fc

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-- UPDATE EXISTING project_attachments table
2+
-- modify column `path`
3+
4+
ALTER TABLE project_attachments ALTER COLUMN "path" TYPE character varying(2048);

src/models/projectAttachment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = function defineProjectAttachment(sequelize, DataTypes) {
1717
size: { type: DataTypes.INTEGER, allowNull: true }, // size in MB
1818
category: { type: DataTypes.STRING, allowNull: true }, // size in MB
1919
description: { type: DataTypes.STRING, allowNull: true },
20-
path: { type: DataTypes.STRING, allowNull: false },
20+
path: { type: DataTypes.STRING(2048), allowNull: false },
2121
contentType: { type: DataTypes.STRING, allowNull: true },
2222
allowedUsers: DataTypes.ARRAY({ type: DataTypes.INTEGER, allowNull: true }),
2323
deletedAt: { type: DataTypes.DATE, allowNull: true },

0 commit comments

Comments
 (0)