Files
picpeak/backend/migrations/014_add_host_name_to_events.js
T
paul 5328b4f73a Enhance email templates with clickable links, branding, and improved styling
- Add clickable gallery links in all email templates
- Include application logo in email header and footer (custom or PicPeak default)
- Redesign emails with professional styling matching gallery login page
  - Gray background with white content box
  - PicPeak green header with centered logo
  - Clean typography and proper spacing
  - Responsive design for mobile devices
  - Styled call-to-action buttons
  - Footer with branding and copyright
- Update email processor to fetch branding settings dynamically
- Use proper API URLs for logo images in emails

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-10 22:19:15 +02:00

35 lines
822 B
JavaScript

const { db } = require('../src/database/db');
async function up() {
// Check if host_name column already exists
const hasHostName = await db.schema.hasColumn('events', 'host_name');
if (!hasHostName) {
await db.schema.table('events', (table) => {
table.string('host_name').after('event_date');
});
console.log('Added host_name column to events table');
}
}
async function down() {
await db.schema.table('events', (table) => {
table.dropColumn('host_name');
});
}
module.exports = { up, down };
// Run migration if called directly
if (require.main === module) {
up()
.then(() => {
console.log('Migration completed successfully');
process.exit(0);
})
.catch((error) => {
console.error('Migration failed:', error);
process.exit(1);
});
}