🎯 Collections Page Improvements: - Removed TCG selection from creation modal - Added image URL field for collection hero images - Changed public checkbox to visibility dropdown (Private/Invite-Only/Public) - Added success modal with navigation to created collection - Integrated real API calls for creating and fetching collections - Added Permission indicators throughout the interface 🃏 Collection Detail Page Enhancements: - Created comprehensive empty state for new collections - Added 'Browse Cards to Add' call-to-action button - Included quick add search functionality - Improved filtered results empty state with clear filters option - Integrated API calls for real collection data - Distinguished between empty collection vs no search results 🗄️ Database & API Updates: - Added image column to collections table - Updated collections API to handle image field - Enhanced API to return proper collection data structure - Added fallback to mock data for development 🎨 User Experience: - Beautiful success confirmation after collection creation - Direct navigation to newly created collection - Clear visual distinction between different empty states - Intuitive call-to-action buttons for collection building - Permission badges visible on collection cards Ready for users to create collections with images and start building their card collections! 🚀
29 lines
732 B
JavaScript
Executable file
29 lines
732 B
JavaScript
Executable file
#!/usr/bin/env node
|
|
|
|
import { config } from 'dotenv';
|
|
import { sql } from '@vercel/postgres';
|
|
|
|
// Load environment variables
|
|
config({ path: '.env.local' });
|
|
|
|
async function addImageColumn() {
|
|
try {
|
|
console.log('🖼️ Adding image column to collections table...\n');
|
|
|
|
// Add image column to collections table
|
|
await sql`
|
|
ALTER TABLE collections
|
|
ADD COLUMN IF NOT EXISTS image TEXT
|
|
`;
|
|
console.log('✅ Added image column to collections table');
|
|
|
|
console.log('\n🎉 Image column added successfully!');
|
|
console.log('\n📋 Collections can now have hero images!');
|
|
|
|
} catch (error) {
|
|
console.error('❌ Migration failed:', error.message);
|
|
process.exit(1);
|
|
}
|
|
}
|
|
|
|
addImageColumn();
|