Update lock files and cleanup

This commit is contained in:
khalid@traclabs.com
2026-05-14 09:00:04 -05:00
parent 62e5e309ad
commit 4564fb1b56
8 changed files with 1310 additions and 708 deletions

View File

@@ -20,10 +20,11 @@ export const Job = sequelize.define('Job', {
type: DataTypes.TEXT,
allowNull: false,
},
// Base64 data URL stored for replay; in production use object storage
// Transient — holds the image only while the job is queued/running.
// Nulled out once processing finishes so we don't persist user photos.
imageDataUrl: {
type: DataTypes.TEXT,
allowNull: false,
allowNull: true,
},
imageMimeType: {
type: DataTypes.STRING(64),
@@ -62,12 +63,6 @@ export const Job = sequelize.define('Job', {
bboxY: { type: DataTypes.FLOAT, allowNull: true },
bboxWidth: { type: DataTypes.FLOAT, allowNull: true },
bboxHeight: { type: DataTypes.FLOAT, allowNull: true },
// Cropped image data URL (stored for UI preview / debugging)
croppedImageDataUrl: {
type: DataTypes.TEXT,
allowNull: true,
},
}, {
tableName: 'jobs',
timestamps: true,
@@ -76,6 +71,5 @@ export const Job = sequelize.define('Job', {
export async function initDb() {
const { mkdirSync } = await import('fs');
mkdirSync(join(__dirname, '../data'), { recursive: true });
// alter: true adds new columns to an existing table without dropping data
await sequelize.sync({ alter: true });
}