Skip to content

Commit

Permalink
fix: use medium blob instead of blob for biotope image in database
Browse files Browse the repository at this point in the history
  • Loading branch information
smyllet committed Jun 2, 2024
1 parent 1239c3b commit 86b6d42
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/migration/2024_06_02_20_00_00_increaseBiotopeImageSize.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import bcrypt from "bcryptjs";
import { DataTypes } from "sequelize";
import { v4 as uuidV4 } from "uuid";
import { Migration } from "../model/db";

export const up: Migration = async ({ context: queryInterface }) => {
await queryInterface.changeColumn("biotope", "image", {
type: DataTypes.BLOB("medium"),
allowNull: true,
defaultValue: null,
});
};
2 changes: 1 addition & 1 deletion src/model/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export default class Db {
allowNull: false,
},
image: {
type: DataTypes.BLOB,
type: DataTypes.BLOB("medium"),
defaultValue: null,
},
startedDate: {
Expand Down

0 comments on commit 86b6d42

Please sign in to comment.