feat: pictures table, Hetzner S3 upload/delete, auto-migration

- pictures table with UUID, status enum, timestamps, blurhash, design
- Auto-trigger updates updated_at on every row change
- POST /api/pictures/:id/upload  → upload file to Hetzner snakkimo bucket
- DELETE /api/pictures/:id       → removes DB row + Hetzner file
- PATCH /api/pictures/:id        → auto-sets published/blocked timestamps
- Migration runs on every server start (idempotent)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-20 13:39:16 +02:00
parent b82a468197
commit 0f35459b86
6 changed files with 1145 additions and 8 deletions

View File

@@ -8,11 +8,15 @@
"dev": "nodemon src/index.js"
},
"dependencies": {
"express": "^4.19.2",
"pg": "^8.11.3",
"dotenv": "^16.4.5",
"@aws-sdk/client-s3": "^3.1050.0",
"@aws-sdk/lib-storage": "^3.1050.0",
"cors": "^2.8.5",
"express-validator": "^7.1.0"
"dotenv": "^16.4.5",
"express": "^4.19.2",
"express-validator": "^7.1.0",
"multer": "^2.1.1",
"pg": "^8.11.3",
"uuid": "^14.0.0"
},
"devDependencies": {
"nodemon": "^3.1.0"