Files
Filamenteka/DEPLOY.md
DaX 12e91d4c3e Remove refresh icon and fix Safari/WebKit runtime errors
- Removed manual refresh button from frontend (kept auto-refresh functionality)
- Fixed WebKit 'object cannot be found' error by replacing absolute positioning with flexbox
- Added lazy loading to images to prevent preload warnings
- Cleaned up unused imports and variables:
  - Removed unused useRef import
  - Removed unused colors state variable and colorService
  - Removed unused ColorSwatch import from FilamentTableV2
  - Removed unused getModifierIcon function from MaterialBadge
- Updated tests to match current implementation
- Improved layout stability for better cross-browser compatibility
- Removed temporary migration scripts

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-30 22:37:30 +02:00

63 lines
1.8 KiB
Markdown

# Deployment Guide for Filamenteka
## Important: API Update Required
The production API at api.filamenteka.rs needs to be updated with the latest code changes.
### Changes that need to be deployed:
1. **Database Schema Changes**:
- Column renamed from `vakum` to `spulna`
- Column `otvoreno` has been removed
- Data types changed from strings to integers for `refill` and `spulna`
- Added CHECK constraint: `kolicina = refill + spulna`
2. **API Server Changes**:
- Updated `/api/filaments` endpoints to use new column names
- Updated data type handling (integers instead of strings)
- Added proper quantity calculation
### Deployment Steps:
1. **Update the API server code**:
```bash
# On the production server
cd /path/to/api
git pull origin main
npm install
```
2. **Run database migrations**:
```bash
# Run the migration to rename columns
psql $DATABASE_URL < database/migrations/003_rename_vakum_to_spulna.sql
# Run the migration to fix data types
psql $DATABASE_URL < database/migrations/004_fix_inventory_data_types.sql
# Fix any data inconsistencies
psql $DATABASE_URL < database/migrations/fix_quantity_consistency.sql
```
3. **Restart the API server**:
```bash
# Restart the service
pm2 restart filamenteka-api
# or
systemctl restart filamenteka-api
```
### Temporary Frontend Compatibility
The frontend has been updated to handle both old and new API response formats, so it will work with both:
- Old format: `vakum`, `otvoreno` (strings)
- New format: `spulna` (integer), no `otvoreno` field
Once the API is updated, the compatibility layer can be removed.
### Verification
After deployment, verify:
1. API returns `spulna` instead of `vakum`
2. Values are integers, not strings
3. Quantity calculations are correct (`kolicina = refill + spulna`)