managarten/uload/scripts/fix-field-names.sh
Till-JS c712a2504a feat: integrate uload and picture, unify package naming
- Add uload project with apps/web structure
  - Reorganize from flat to monorepo structure
  - Remove PocketBase binary and local data
  - Update to pnpm and @uload/web namespace

- Add picture project to monorepo
  - Remove embedded git repository

- Unify all package names to @{project}/{app} schema:
  - @maerchenzauber/* (was @storyteller/*)
  - @manacore/* (was manacore-*, manacore)
  - @manadeck/* (was web, backend, manadeck)
  - @memoro/* (was memoro-web, landing, memoro)
  - @picture/* (already unified)
  - @uload/web

- Add convenient dev scripts for all apps:
  - pnpm dev:{project}:web
  - pnpm dev:{project}:landing
  - pnpm dev:{project}:mobile
  - pnpm dev:{project}:backend

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 04:00:36 +01:00

23 lines
No EOL
886 B
Bash
Executable file

#!/bin/bash
# Fix field names to match PocketBase schema
echo "Fixing field names in source files..."
# Fix user -> user_id in filters and create statements
find src -type f \( -name "*.ts" -o -name "*.svelte" \) -exec sed -i '' \
-e 's/filter: `user="/filter: `user_id="/g' \
-e 's/filter: `link="/filter: `link_id="/g' \
-e 's/filter: `folder="/filter: `folder_id="/g' \
-e 's/\&\& user="/\&\& user_id="/g' \
-e 's/\&\& link="/\&\& link_id="/g' \
-e 's/\&\& folder="/\&\& folder_id="/g' {} \;
# Fix field names in create/update operations
find src -type f \( -name "*.ts" -o -name "*.svelte" \) -exec sed -i '' \
-e 's/^\([[:space:]]*\)user: /\1user_id: /g' \
-e 's/^\([[:space:]]*\)link: /\1link_id: /g' \
-e 's/^\([[:space:]]*\)folder: /\1folder_id: /g' {} \;
echo "Done! Field names have been updated."
echo "Please restart your dev server to apply changes."