feat: add original filename preservation and Lightroom export support
Addresses GitHub issue #132 - enables filtering client feedback and exporting filenames for use in Lightroom. Changes: - Add original_filename column to photos table via migration - Store original filename during photo upload - Fix export service column name mismatches (path, size_bytes, uploaded_at) - Fix table name (photo_categories instead of categories) - Fix toFixed() calls to handle string ratings from database Export formats available: - TXT with comma separator (for Lightroom Library Filter) - CSV with full metadata - JSON for automation - XMP sidecar files (for Lightroom/Bridge/Capture One)
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Migration 062: Add original_filename to photos table
|
||||
* - photos.original_filename: preserves the original filename from upload
|
||||
* This enables Lightroom integration by exporting filtered filenames
|
||||
*/
|
||||
|
||||
const { addColumnIfNotExists } = require('../helpers');
|
||||
|
||||
exports.up = async function(knex) {
|
||||
console.log('Running migration: 062_add_original_filename');
|
||||
|
||||
// photos.original_filename (nullable - original filename before renaming)
|
||||
await addColumnIfNotExists(knex, 'photos', 'original_filename', (table) => {
|
||||
table.string('original_filename', 512);
|
||||
});
|
||||
|
||||
console.log('Migration 062_add_original_filename completed');
|
||||
};
|
||||
|
||||
exports.down = async function(knex) {
|
||||
console.log('Rollback: 062_add_original_filename');
|
||||
// Keep column (safe rollback not removing data). Intentionally no-op.
|
||||
};
|
||||
Reference in New Issue
Block a user